From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from resqmta-ch2-01v.sys.comcast.net (resqmta-ch2-07v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:39]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 8098B77AF7 for ; Mon, 26 Oct 2020 11:51:00 -0700 (PDT) Received: from resomta-ch2-07v.sys.comcast.net ([69.252.207.103]) by resqmta-ch2-07v.sys.comcast.net with ESMTP id X6g6kXVdMUyhhX7a7kBPOy; Mon, 26 Oct 2020 18:50:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1603738259; bh=aAg67g2PyWGC9qlCcoeZuSr+0tFlibvMmcABi5f1CLk=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=neQZR9rBuKlz7snRgA1jiawBWjmRSG7p2UZfNuOfFOLjuBYTaHzEschXHqezUW+k+ TuFWx5sZlCxaWgCN/1zXd/eIuR5dF24oZFd0Vn6kOtLaep/Phug66hbz+Pq0hnX8mD pYQ4zG7JtWhKz2OETjjHWaP293ATwAfUyqeeImcQbn+U23QNfmWJeFdLL488/Bg7vf G9tnnzUf/L2XJEtstEsaYMxbmlhihAhytqofykpS0ClBRG0ZMzzQ/cjm7cCshDGPqx VVLWa1Y1dDvwoJO5QoY0LiE3CrY7Xi/wvKtzTpE//d9NzndYRnYdiRQICTGj708z+m ImMdd5pTlOwjQ== Received: from unknown ([IPv6:2601:408:c300:a3d0::32fe]) by resomta-ch2-07v.sys.comcast.net with ESMTPSA id X7a5kjP60rFd4X7a6ksN7f; Mon, 26 Oct 2020 18:50:58 +0000 X-Xfinity-VMeta: sc=0.00;st=legit To:edbrowse-dev@edbrowse.org From: Karl Dahlke Reply-to: Karl Dahlke User-Agent: edbrowse/3.7.6 Subject: [edbrowse-dev] tagIsRooted Date: Mon, 26 Oct 2020 14:50:56 -0400 Message-ID: <20200926145056.eklhad@comcast.net> X-BeenThere: edbrowse-dev@edbrowse.org List-Id: Edbrowse Development List Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=nextpart-eb-117352 Content-Transfer-Encoding: 7bit This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --nextpart-eb-117352 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable First off, the question I like to ask, and the question you should ask: why don't other browsers run into trouble if the engine doesn't provide = gc free object hooks for the browser to use? Why does only edbrowse need this stuff? Because every other browser rerenders the screen after each dom change. That might be ten times a second, and why not? If things change that fast it looks like animation, perhaps it is = intentional animation. Or, maybe the little stock price in the upper right corner is = constantly changing, or a countdown timer to when the bidding is ticking down, or whatever. The user can look at it or not. His eyes do the selecting. This on the fly rerendering is a feature for them. We don't have that luxury. I can't print "line 3 has changed" ten times per second. That is an unworkable interface, and it illustrates the nearly = impossible task of squashing visual websites into a command line format. So, I rerender every 20 seconds or so, or if you issue a command that = might cause a screen change. That is my algorithm in a nutshell. But that means the stuff you are reading, and maybe clicking on, might = not be up to date. The object you are accessing when you submit a form might not even be = there any more, freed, and if I access it, core dump. So wee need mechanisms that no other browser needs. duktape happens to provide those mechanisms; I don't think the other = engines do. With this in mind, please pull and look at a routine I wrote, tagIsRooted() in ebjs.c. I might call this when you want to go to a hyperlink or submit a form = or such, just to make sure the tag and its corresponding object are still valid. If I call this in just the right way, from all the right places, I = might not need the gc free-object notifications that I get from duktape. The tagIsRooted routine is kind of awkward, some would say ugly, but it isn't called often, so it just needs to work, and work reliably. Reply with comments and thoughts. This stuff is complicated, probably at the limits of what I can do. So I'll need help from younger and smarter people. Karl Dahlke --nextpart-eb-117352--