W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

Re: Implied Context Parsing (DocumentFragment.innerHTML, or similar) proposal details to be sorted out

From: Yehuda Katz <wycats@gmail.com>
Date: Fri, 8 Jun 2012 16:03:12 -0400
Message-ID: <CAMFeDTVspHDkbo1r_J5d+jo9=qOOKBnyx=EK-NdByYUxTmSduw@mail.gmail.com>
To: Rafael Weinstein <rafaelw@google.com>
Cc: Ryosuke Niwa <rniwa@webkit.org>, Henri Sivonen <hsivonen@iki.fi>, "Tab Atkins Jr." <jackalmage@gmail.com>, Jonas Sicking <jonas@sicking.cc>, Webapps WG <public-webapps@w3.org>, Scott González <scott.gonzalez@gmail.com>
It's intentional. If you look at the implementation, we explicitly extract
the <script> tags and use our globalEval implementation to execute them.

Yehuda Katz
(ph) 718.877.1325


On Fri, Jun 8, 2012 at 5:01 AM, Rafael Weinstein <rafaelw@google.com> wrote:

> Yehuda,
>
> Can you help clarify here whether jQuery's behavior is intentional
> (i.e. use cases drive the need for executability), or if it's a
> side-effect of the implementation?
>
> On Fri, Jun 1, 2012 at 1:27 PM, Ryosuke Niwa <rniwa@webkit.org> wrote:
> > On Thu, May 31, 2012 at 7:55 AM, Henri Sivonen <hsivonen@iki.fi> wrote:
> >>
> >> On Sat, May 19, 2012 at 6:29 AM, Ryosuke Niwa <rniwa@webkit.org> wrote:
> >> > There appears to be a consensus to use document.parse (which is fine
> >> > with
> >> > me), so I would like to double-check which behavior we're picking.
> IMO,
> >> > the
> >> > only sane choice is to unset the already-started flag since doing
> >> > otherwise
> >> > implies script elements parsed by document.parse won't be executed
> when
> >> > inserted into a document.
> >>
> >> I was expecting document.parse() to make scripts unexecutable. Are
> >> there use cases for creating executable scripts using this facility?
> >
> >
> > jQuery appears to let script elements run: http://jsfiddle.net/kB8Fp/2/
> >
> > Also, we're talking about using the same algorithm for template element.
> > I would like script elements inside my template to run.
> >
> > - Ryosuke
> >
>
Received on Friday, 8 June 2012 20:04:04 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:52 GMT