Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:2 Changed 3 years ago by rwaldron
- Priority changed from major to low
- Status changed from new to open
- Milestone 1.4 deleted
Confirmed; But this is no longer an issue from FF 3.6+
comment:3 Changed 2 years ago by dmethvin
- Status changed from open to closed
- Resolution set to patchwelcome
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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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.