[whatwg] E4X and attribute values

Kornel Lesinski kornel at osiolki.net
Tue Jan 16 13:33:32 PST 2007


On Tue, 16 Jan 2007 12:59:56 -0000, Henri Sivonen <hsivonen at iki.fi> wrote:

> Is E4X allowed in event handler attribute values and in javascript:  
> URIs? If yes, how can a UA know whether the E4X parse mode should be  
> used?

This can be explictly stated using Content-Script-Type HTTP header/meta  
and Mozilla's MIME type parameter:
<meta http-equiv="Content-Script-Type" content="text/javascript; e4x=1" />

http://developer.mozilla.org/en/docs/New_in_JavaScript_1.6
http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.2.1

However since the e4x type parameter seems to be only affecting parsing of  
comments and CDATA inside <script>, it's irrelevant for attributes, so I  
think it shouldn't be required and E4X should work in  
attributes/bookmarklets by default.

-- 
regards, Kornel Lesiński



More information about the whatwg mailing list