edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] master window
@ 2018-01-31  1:16 Karl Dahlke
  2018-01-31  1:40 ` Kevin Carhart
  0 siblings, 1 reply; 3+ messages in thread
From: Karl Dahlke @ 2018-01-31  1:16 UTC (permalink / raw)
  To: Edbrowse-dev

[-- 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("g:plusone");
document.createElement('<iframe name="stlframe" allowtransparency="true" style="body{background:transparent;}" ></iframe>');

What are those?!

Karl Dahlke

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-31  2:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-31  1:16 [Edbrowse-dev] master window Karl Dahlke
2018-01-31  1:40 ` Kevin Carhart
2018-01-31  2:18   ` Karl Dahlke

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).