Re: [whatwg] Will you consider about RFC 4329?

2010-04-06 Thread James Kerr
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Ian Hickson i...@hixie.ch wrote:
 On Mon, 5 Apr 2010, Swampert wrote:
 In your HTML5 draft standard, the default value for type attribute in 
 script element is text/javascript. While according to RFC 4329, the 
 MIME type text/javascript is obsolete, the proper MIME type for 
 JavaScript is application/javascript or application/ecmascript.
 
 The type everyone uses is text/javascript. What's the point of using 
 application/javascript? What problem does it solve?

I believe this has to do with character encoding issues and is the same
reason that application/xml is preferred over text/xml. MIME types in the
text/* set apparently have a default encoding of US-ASCII which I can
imagine may throw up conflicts in some situations given that the primary and
generally accepted encoding for XML and HTML documents (and increasingly
other applications in general) is Unicode based.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iF4EAREIAAYFAku6/5EACgkQA5dpS+2BZawJzgD/Vh5NYeOT2j0hKIiW59vVKzIG
mqhFmUbFhz2PsFFUUB4A/Asxy2C4HiBIp8FfoZ1Elz+4jTr7Ehhv1xSGKe8Xwl5k
=1FdY
-END PGP SIGNATURE-


Re: [whatwg] Will you consider about RFC 4329?

2010-04-06 Thread James Kerr
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Apologies, I've just noticed that I accidentally sent a couple of further
posts directly to Anne instead of to the mailing list. I include them and
Anne's response here for the benefit of the list discussion...

- 
On Tue, 06 Apr 2010 12:40:48 +0200, James Kerr lo...@l0x.in wrote:
 Perusing the script element spec (the last I knew, HTML5 had negated the
 type attribute entirely), I'm left wondering... Why does there have to
be a default type at all? Isn't that the purpose of the HTTP content-type
 header of the file referenced in the src attribute? (The same applies
for the object element - it can have a type attribute, but doesn't need
one) I don't see the point, unless it's purely there as meta-data, in which
case a default is unnecessary...?

Euhm, inline scripts?


 As a side note, the uptake of application/javascript will likely increase
 from this point onwards, as the recently released IE9 preview supports its
use where previous versions did not (the biggest sticking point of adoption
as far as I know). Taking this into consideration, and the fact that

 ∙ it will be the first version of that browser with HTML5 features
 ∙ application/javascript is the official MIME type (however little
 difference it actually makes in reality)

 would suggest no real reason not to go with it?

Authoring material, author mindset, backwards compatibility, etc? RFCs can
be fixed.


- --
Anne van Kesteren
http://annevankesteren.nl/
- 

On Tue, 06 Apr 2010 14:28:48 +0200, James Kerr lo...@l0x.in wrote:
 Anne van Kesteren wrote:
 Euhm, inline scripts?

 OK, but what I was getting at was also : doesn't each browser only support
 one scripting language? JScript on IE and Javascript on the others. Meaning
 there is no actual choice to be made and each browser will interpret the
 contents of a script with the language it supports...

Not if the type attribute specifies something we do not support, but I agree
that the default can be any type that matches JavaScript in theory as it is
not exposed.


- --
Anne van Kesteren
http://annevankesteren.nl/
- 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iF4EAREIAAYFAku7bSgACgkQA5dpS+2BZayhlQEAgzPWWdRG57ovLP8h/KWIh6ca
TZiImBSzvvt0wAXZb+gA/RjO3FrG7QkdBCsdLX+POskYlC7EZTMiNQFyVDtK4G22
=zzEp
-END PGP SIGNATURE-