Status: New
Owner: ----

New issue 183 by david.b.calhoun: onreadystatechange on script tags is an  
object, but has no functionality
http://code.google.com/p/v8/issues/detail?id=183

Description

After creating a script node and appending it to the page's HEAD element,
the node has a default object onreadystatechange, which is null by default.

This is different behavior than other other Webkit implementations such as
Safari, which leaves onreadystatechange undefined.

Also, it seems that the property doesn't actually function as expected, for
instance how it functions in IE together with the use of the readyState
property: http://msdn.microsoft.com/en-us/library/ms534308(VS.85).aspx


Why a Problem?

Advanced methods of JS browser detection look for implemented methods such
as onreadystatechange to determine what methods are supported by the
browser.  The existence of the onreadystatechange object usually indicates
to the script that the browser is IE, and thus will attempt to try to use
the IE method of using onreadystatechange in addition to readyState to
determine when a script has completed loading, which is ultimately a method
that fails for Chrome (since onload should be used instead).

Attachment

I attached an isolated script which dynamically loads a script (jQuery) by
dynamically placing a new script tag on the document.  Then, using the
script as a node/hook, outputs the typeof and value of onreadystatechange
and readyState.

Attachments:
        onreadystatechange.htm  895 bytes

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to