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] Dynamic Scripts (fwd)
Date: Tue, 30 Jan 2018 09:58:39 -0500	[thread overview]
Message-ID: <20180030095839.eklhad@comcast.net> (raw)
In-Reply-To: <alpine.LRH.2.03.1801291513290.22631@carhart.net>

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

With latest push, you can create an Iframe dynamically using document.createElement, and put it just about anywhere.
Kevin's immediate program fires immediately, though it is still not right in a way that you can't see.

As I've been doing cross-frame references, I come to realize an unexpected problem.
In side the frame f, create a script s, and then ask: s instanceof Script, and it fails.

Subtle ...

It fails because classes are created per window, that is, per frame.
If a script is instantiated by any means inside a frame f, it is an instance of f.contentWindow.Script, not an instance of Script.
I'm almost certain that these classes should be defined across all frames, across all windows, like Array and Date and the like.
It would also save time and memory, and that's a nice thing too.
I was going to do this a while ago, put them all in eb$master, but there was a snag, a reason not to, and I don't remember the gotcha right now.
I'll go back and look, because it's a tad more important than I thought it first was.

Karl Dahlke

      reply	other threads:[~2018-01-30 14:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 23:24 Kevin Carhart
2018-01-30 14:58 ` Karl Dahlke [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

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

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

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