edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Karl Dahlke <eklhad@comcast.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] master window
Date: Tue, 30 Jan 2018 20:16:10 -0500	[thread overview]
Message-ID: <20180030201610.eklhad@comcast.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1496 bytes --]

It wasn't a rewrite, but certainly a reorganize.
Most of startwindow.js now lives in the "master window" block, wherein it is compiled only once.
This saves space and time, and allows for a proper instanceof operator, as described in my previous post.
Here's a tricky thing about the reorganization though.
On rare occasions a function refers to document.
If compiled once, it always refers to document in window 0. That's bad!
I wrote a my$doc function in the master window to figure out the document of your current context.
The compiled-once function can use that to refer to document.
I tried function() { return eval("document"); }, which I thought would run in realtime and work, but it doesn't work. Don't know why.
Maybe eval runs once when the function is compiled.
In any case, I had to write it as a native method, which isn't hard, it's only 3 lines of C.
This function is critical; it's key to folding all that stuff into the master window.

I also made a few minor fixes here and there, and uncovered something else that I didn't fix,
because I don't know anything about it, never heard of it, and it logically belongs in another commit.
It did however cause a seg fault, and I had to work around that.
See startwindow.js line 1421.
Here it is, from oranges.com.

document.createElement('<iframe name="stlframe" allowtransparency="true" style="body{background:transparent;}" ></iframe>');

What are those?!

Karl Dahlke

             reply	other threads:[~2018-01-31  1:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31  1:16 Karl Dahlke [this message]
2018-01-31  1:40 ` Kevin Carhart
2018-01-31  2:18   ` Karl Dahlke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180030201610.eklhad@comcast.net \
    --to=eklhad@comcast.net \
    --cc=Edbrowse-dev@lists.the-brannons.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).