W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2011

[whatwg] Should script run if it comes from a HTML fragment?

From: Henri Sivonen <hsivonen@iki.fi>
Date: Thu, 10 Feb 2011 06:14:12 -0800 (PST)
Message-ID: <1324417584.254550.1297347252779.JavaMail.root@cm-mail03.mozilla.org>
> * innerHTML doesn't run scripts and they are inserted disabled.

FWIW, here's a counter-example:

The above runs the script in all browsers except Firefox 4 (which follows the spec). The pattern is reportedly from the http://crossbrowserajax.com/ library.

However, http://www.oele.net/innerhtmljs.html doesn't run in IE9 PP7.

I'm not thrilled about adding code to support this quirky pattern at this point of the release cycle (evang is being attempted), but I thought I'd mention this finding even though I'm not asking for a spec change (at least not yet).

Henri Sivonen
hsivonen at iki.fi
Received on Thursday, 10 February 2011 06:14:12 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:30 UTC