[whatwg] Fallback behavior
jonas at sicking.cc
Thu Aug 21 17:31:43 PDT 2008
Simon Pieters wrote:
> On Thu, 21 Aug 2008 23:54:44 +0200, Jonas Sicking <jonas at sicking.cc> wrote:
>> Here is the list of elements that we *don't* execute scripts inside of
>> in firefox:
>> i.e. <iframe>, <noframes>, <noembed>
>> Everywhere else we do execute the script.
>> The reason these elements ended up at the list is in bugs
> iframe, noframes and noembed are parsed as CDATA elements
> so there can't be any script elements as children of those in text/html.
> In Opera and WebKit, the script executes in
> and it hasn't caused us any problems AFAIK.
Looks like firefox doesn't parse the contents of the <iframe> as markup
either, but rather treat it as CDATA. Which makes me wonder why we ever
look for <iframe>s in the parent chain :)
I suspect it's just remnants from when things worked differently, the
check was put in in 1999 :)
But the effect is that even in XHTML, like the example you're providing
above, scripts in iframes don't execute. This was not intentional though
given that this code was put in in 1999, before we had xhtml support.
More information about the whatwg