[whatwg] JavaScipt in output?
Ian Hickson
ian at hixie.ch
Wed Feb 13 20:11:01 PST 2008
On Tue, 6 Mar 2007, Anne van Kesteren wrote:
> On Mon, 05 Mar 2007 20:33:55 +0100, Ian Hickson <ian at hixie.ch> wrote:
> > >
> > > Are there any restrictions on what you can put in such an attribute?
> >
> > It's an open issues in HTML5. In HTML4, there's a Content-Script-Type
> > thing that can be used, I guess we could move this into HTML5 too now
> > that we have the pragma directives thing.
>
> So if Content-Script-Type is not a MIME type user agents support they
> must ignore all event handlers? What if a <script> element in the page
> is set to text/javascript and sets a few event handlers?
>
> I suppose it could be made to work... If nobody has set
> Content-Script-Type to some weird value that would stop their site from
> working...
Nobody currently supports this as far as I can tell:
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cmeta%20http-equiv%3DContent-Script-Type%20content%3Dtext%2Fplain%3E%0A%3Cbody%20onload%3D%22w(%27test%27)%22%3E
If someone can convince a browser vendor or two to implement this, it
would go a long way towards arguing for it to be in the spec. There's no
point adding it if nobody is going to follow it.
I'll look into how common it is, too. However, even if it's used with
random values, we can always introduce a new value. That's not a problem.
The problem is getting people to implement it, IMHO.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg
mailing list