[whatwg] scripts, defer, document.write and DOMContentLoaded

Garrett Smith dhtmlkitchen at gmail.com
Thu Aug 27 23:20:01 PDT 2009


On Sat, Aug 15, 2009 at 8:11 PM, Ian Hickson<ian at hixie.ch> wrote:
> On Tue, 11 Aug 2009, Kristof Zelechovski wrote:
> <
>>       1. The specification defines the term "script source" to mean
>> either the text or the infoset, depending whether the script is
>> text-based or XML-based.  What is the script source for type text/xml
>> then?
>
> Assuming you mean an internal script, the children of the <script>
> element.
>
>
>> What happens when the XML is invalid?
>
> Assuming you mean in an XHTML document, the parser would have failed long
> before the <script> element was completely parsed and executed.
>
> If you mean a text/html document, then I don't know which XML you mean.
>
>
>
>>       2. Why doesn't "script source" mean the text of the script in all
>> cases?
>
> Because that would break XML-based scripting languages.
>
>
>>       3. Microsoft Internet Explorer supports XHTML as "text/xml",
>> although it does not support XHTML as "application/xhtml+xml".  But I did
>> not mention XHTML anywhere in my question.  OTOH, any XML makes a SCRIPT for
>> IE - a "data script".  Or did you mean a "data script" to be necessarily
>> plain text?  I fail to see it specified.
>
> I have no idea what you are asking.
>
>
>>       4. So, the question is whether such data scripts are allowed to be
>> loaded externally.  AIUI, they are not allowed.  AFAIK, they are supported,
>> at least in MSIE.
>
> I'm not aware of any UAs implementing an XML-based scripting language,

http://msdn.microsoft.com/en-us/library/ms766512%28VS.85%29.aspx

Now you are.

Garrett


More information about the whatwg mailing list