edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] Dynamic Scripts (fwd)
Date: Mon, 29 Jan 2018 15:24:08 -0800 (PST)	[thread overview]
Message-ID: <alpine.LRH.2.03.1801291513290.22631@carhart.net> (raw)



Ahh, this is great!  I think this is a big one.  I think we brought 
it up at one time and set it aside.  Do you think it's the same as the 
following?  Check it out, we touched on this way before duktape.  I copied 
and pasted this old list traffic a long time ago, and when I read your 
message, I thought it sounded like the same thing.  Exemplified by 
http://carhart.net/~kevin/immediate.html


On Wed, 15 Jun 2016, Karl Dahlke wrote:

> Is there some simple js you could whip up and post,
> as an example, so I know what you're talking about?
>
> Karl Dahlke
>

---

I replied:

Hi Karl
Yes.... could you go to http://carhart.net/~kevin/immediate.html?
In edbrowse nothing will happen so please 'ub' for the HTML source.
Now if I bail out and try it in my firefox, the alert will fire.  I'm not 
sure precisely which
line it occurs on.  But there is not an eval() in javascript, so I think 
there must be
evaluation supplied by the DOM.

I believe this is the purpose of the iframe formulation in the google 
groups page we were
talking about a while ago.  immediate.html is a simpler version of the 
construction that they
use.  Since google is doing it, it may be a common phrasing.
---

Karl replied:

> frame.contentDocument.write(html);

The key here is, I think, when we design the new Iframe object,
that Iframe.contentDocument.write() somehow invokes the innerHTML 
machinery.
That parses and executes html immediately,
though if that html has <script> as in your example,
the script might not run immediately, as another script is already 
running,
but I don't think that's a problem,
as long as the html dom objects are created immediately, which they are,
because innerHTML requires that as we already saw.

---


             reply	other threads:[~2018-01-29 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-29 23:24 Kevin Carhart [this message]
2018-01-30 14:58 ` 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:
  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=alpine.LRH.2.03.1801291513290.22631@carhart.net \
    --to=kevin@carhart.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).