[Bug 7792] New: async on inline script is gratuitously backwards-incompatible, should be ignored

http://www.w3.org/Bugs/Public/show_bug.cgi?id=7792

           Summary: async on inline script is gratuitously backwards-
                    incompatible, should be ignored
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec bugs
        AssignedTo: dave.null@w3.org
        ReportedBy: hsivonen@iki.fi
         QAContact: public-html-bugzilla@w3.org
                CC: ian@hixie.ch, mike@w3.org, public-html@w3.org,
                    jonas@sicking.cc


Since inline scripts are immediately available, it seems that the only effect
the async attribute has on them is that document.write() blows away the
document instead of writing to the stream.

While this would allow an optimization in speculative parsing, it seems
dangerous to introduce a situation where people developing on an older browser
could blow away the document without any other benefit than a timing
optimization. Furthermore, if one wanted to deliberately promise not to use
document.write() but one otherwise wanted the usual scripting semantics, it
would be less confusing to have an attribute like "nodocumentwrite" which would
make a parser with speculation capability not start a new speculation. (I'm not
actually suggesting such an attribute here, because I don't have data about the
perf effect of the potential optimization.)

Thus, even if a minor opportunity for optimization is lost, it would seem
prudent to ignore async on inline scripts like defer is ignored on inline
scripts.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 2 October 2009 09:08:50 UTC