Bug Tracker

Opened 10 years ago

Closed 8 years ago

#5773 closed bug (patchwelcome)

Dynamically adding jQuery js file won't trigger jQuery.isReady

Reported by: Gosse Owned by:
Priority: low Milestone:
Component: core Version: 1.4a2
Keywords: Cc:
Blocked by: Blocking:

Description

For example,

<html>

<head> <script>

function doLoad() {

var e = document.createElement("script"); e.type = "text/javascript" ; e.charset = "UTF-8"; e.src = 'http://code.jquery.com/jquery-nightly.js'; document.getElementsByTagName("HEAD")[0].appendChild(e);

} </script>

</head> <body>

<input type="button" value="load JS file" onclick='doLoad();'/> <input type="button" value="check isReady" onclick='alert(jQuery.isReady);jQuery(function(){alert(1);});'/>

</body>

</html>

Change History (3)

comment:1 Changed 9 years ago by bvrob

This ticket is related to #4889, which fixed the issue for all browsers that implement document.readyState (IE6+, FF3.6+, Safari 4, Chrome 5, Opera 10.x). According to recent market share data (http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2), FF 3.0 and FF 3.5 are the only browsers above 1% that are affected by this issue.

comment:2 Changed 9 years ago by Rick Waldron

Milestone: 1.4
Priority: majorlow
Status: newopen

Confirmed; But this is no longer an issue from FF 3.6+

comment:3 Changed 8 years ago by dmethvin

Resolution: patchwelcome
Status: openclosed

Since this is a rare case and the browsers affected are old, I'm going to close this. If someone is affected by this and wants to come up with a fix, we could consider adding it if there were no negative impacts to mainstream browsers.

Note: See TracTickets for help on using tickets.