W3C home > Mailing lists > Public > public-html-xml@w3.org > January 2011

Re: The interpretation of script

From: Anne van Kesteren <annevk@opera.com>
Date: Tue, 18 Jan 2011 15:12:21 +0100
To: public-html-xml@w3.org, "Norman Walsh" <ndw@nwalsh.com>
Message-ID: <op.vpiceudj64w2qv@anne-van-kesterens-macbook-pro.local>
On Mon, 17 Jan 2011 19:30:59 +0100, Norman Walsh <ndw@nwalsh.com> wrote:
> This problem bites doubly hard, because I believe a significant
> argument in favor of the script tag is for legacy compatibility. This
> implies that if I *did* want to make a browser that, for example,
> executed applciation/normslanguage content, I'd have to some how make
> sure that there was no legacy content with that type.

I do not think this problem is as big as you make it seem. It has not been  
very hard to come up with new simple short names we could use for HTML  
elements and attributes. Coming up with a media type that is not used in  
<script type> today would be even less difficult. Having said that, I am  
not sure I would want browsers to expose another scripting language, but  
the possibility is certainly there. (Much like the possibility is there to  
replace CSS.)

> On the face of it, it would seem that some forward-looking adaptation
> would be valuable. I'd prefer a <foreign-content> element, with
> appropriate semantics over <script>, but I appreciate that this is not
> without problems. (For my part, if we think the life expectancy of
> HTML is effectively indefinite, adding a new element now even if I
> couldn't rely on it for 10 years would still be better.)
> But even something as simple as a (NO)RUN attribute on script (which
> wouldn't cause any problems in legacy browsers) would at least provide
> a way to make my intention explicit.

"norun" would cause problems. E.g. <script norun> would run today, but not  
tomorrow. And with <script run type=sometype> you have the reverse  
problem. I do not really see how this is better than just coming up with a  
new type once we are ready to deploy a new scripting language. There are  
way more complicated problems to solve when it comes to that anyway. (DOM  
integration, what happens with other <script> elements that have  
JavaScript, what happens with event handler attributes, etc.)

Anne van Kesteren
Received on Tuesday, 18 January 2011 14:13:23 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:58:27 UTC