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

[whatwg] JavaScipt in output?

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 14 Feb 2008 04:11:01 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0802140347450.20115@hixie.dreamhostps.com>
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.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 13 February 2008 20:11:01 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:39 UTC