Skip to content
This repository has been archived by the owner on Oct 21, 2022. It is now read-only.

Commit

Permalink
async timeout. not sure why it's necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
scottjehl committed Jan 19, 2011
1 parent 29b1e7e commit 9bdd978
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions rwd-images/rwd-images.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,15 @@
readyCallback = function(){
if( complete ){ return; }
complete = true;
if( base ) {
//set base back to something real before removing
base.href = dirPath;
head.removeChild(base);
}
findrepsrc();
//making this async seems to ensure images don't double request?
setTimeout(function(){
if( base ) {
//set base back to something real before removing
base.href = dirPath;
head.removeChild(base);
}
findrepsrc();
},0);
};

//DOM-ready or onload handler
Expand Down

0 comments on commit 9bdd978

Please sign in to comment.