Skip to main content

Bug Tracker

Side navigation

#5773 closed bug (patchwelcome)

Opened January 08, 2010 11:08AM UTC

Closed March 31, 2011 04:55PM UTC

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>

Attachments (0)
Change History (3)

Changed July 13, 2010 07:52PM UTC by bvrob comment:1

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.

Changed November 01, 2010 08:29PM UTC by rwaldron comment:2

milestone: 1.4
priority: majorlow
status: newopen

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

Changed March 31, 2011 04:55PM UTC by dmethvin comment:3

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.