From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-ch2-11v.sys.comcast.net (resqmta-ch2-11v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:43]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 39B237933B for ; Mon, 3 Jul 2017 04:48:30 -0700 (PDT) Received: from resomta-ch2-14v.sys.comcast.net ([69.252.207.110]) by resqmta-ch2-11v.sys.comcast.net with SMTP id Rzqed7PE5xSSiRzqedRnhP; Mon, 03 Jul 2017 11:49:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1499082540; bh=tmQN8EWSOxsXQ1T/bTTKoeRrO0+Qae/6eNjeNjkdlNE=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=B53Y5tE611b0jPwRUJM4ZRmyjDHWfwT5Zvnj5ck30Jv5iYrhgEKPpaMqb4plyUcOc QZVFkbZUc3Zw4kAUG367TXZl9mHZwONQt9d5GhYvrpp/gJg/KKYgk8IHKpFG+ZytZR n+0CRaqhbsH94VwZ+Dci/LkI7I7TLpTFz18GnEjE2nZSZeKq53KYCJ6escRtr+cU6q 7OjBuTRjsWK/LAkqDUgS6e7RMfQ1OohtDuRGwXQtoVPQ0LxQM+BgXo3kY5Bz3yvi/S /PxHeRZBcHXGwQZVksZEJRvr0qI9nIZAbG1EoC4K79ODNxEKdYN308fgnFjd8Uywue HNU8YqZazsbZg== Received: from unknown ([IPv6:2601:408:c301:784d:21e:4fff:fec2:a0f1]) by resomta-ch2-14v.sys.comcast.net with SMTP id RzqddwzNEqLPERzqddwQhd; Mon, 03 Jul 2017 11:49:00 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke References: <20170601205258.eklhad@comcast.net> <8737ae4qqv.fsf@the-brannons.com> User-Agent: edbrowse/3.6.3+ Date: Mon, 03 Jul 2017 07:48:59 -0400 Message-ID: <20170603074859.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=nextpart-eb-308474 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfFUXiGi2sQLDvuUzk2zLS7nlWQ7X3b3EPXrGMaDAkmVY1zy59vrurDf6UiI7UxKXuTuN8fnTKy0reaVOG7pwE+nhnss2wL5NVj7ddhxcaeT/MpRCm9yM /ghXiayOPMpyeKeO0iewdpETrGBOnrA1vDuUD0Z1aO0j+39+EasAPOPN Subject: [Edbrowse-dev] predefined classes X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.24 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2017 11:48:30 -0000 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-308474 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable I still like the idea of doing as much as we can in startwindow.js, but = when I tried to move a few more things in that direction I ran into = trouble. The TextNode class, that's an easy one right? TextNode =3D function() { this.data =3D ""; if(arguments.length > 0) { // do your best to turn the arg into a string. this.data +=3D arguments[0]; } } We won't talk about the 40 lines of mozilla specific C needed to do the = same thing in jseng-moz.cpp. Yuck! But ... there's a catch. I can no longer instantiate a TextNode object using the C API. Sure I can invoke new TextNode in js all I want, it works just fine, but if it's not a C defined class I can't use the C primitives to spin = off objects therefrom. "So what" you might ask, and you're almost right. But there is one path of code that needs to do this. innerHTML =3D "html string" parses and renders the html code from within the js process, and = objects are created using the native methods, and that includes a = TextNode object for each fragment of text on the page. "So just make a native method to create that particular object, or = better still, a native function call you can use to invoke = document.createTextNode(), which is how you should be making all your = text nodes all the time anyways for consistency." Right, but I was trying to cut down on the code in jseng-moz.cpp, not = make it bigger. Well it still might be the right path, since I could then move more = classes into startwindow.js and use this new native function to call = createElement, which is how we should be creating all our nodes anyways = for consistency. So it may still be the right thing to do but I got discouraged / busy = with other things and stopped working on it. I'll wait to see if you have any thoughts. Meantime I think we should / must go forward with the duktape = conversion, whoever has the time and energy for that one. I'd like to step up, but I am spending all my waking thoughts, and = perhaps my last dollar, even dollars I don't have (on credit cards etc) = trying to keep my son out of jail for a crime he didn't commit. For those of you across the pond who don't know, innocent people go to = jail all the time in the U.S., and we're ok with that, in fact we love = the idea, if the last election is any indicator. But I digress. If anyone can help with the duk conversion I'll try to coordinate with = my thoughts on moving code from C to js, whence it need not be = "converted" any more, if we can work around some wrinkles, but I don't think that should stop = or postpone the conversion, because the clock is ticking. Thanks for listening. Karl Dahlke --nextpart-eb-308474--