SlexAxton/yepnope.js — Issue #96: Complete callback behavior for multiple yepnope calls
Author: meyertee
Created: 2012-02-21 13:17:35+00:00
State: open

Hi,

not sure it's a bug, but it seems like a change in behavior of the complete callback.
Previously, when calling yepnope.load multiple time, like so:

yepnope(['jquery.js', 'other.js']);

// ....later
yepnope({complete:function(){ console.log('lets go!', jQuery) }});

The complete callback in the 2nd call would fire once all files from the 1st call had been downloaded. Now it fires immediately, resulting in jQuery being undefined in the example above.

I also came across this question on stackoverflow, which uses the same technique: http://stackoverflow.com/questions/7344843/yepnopes-complete-callback-question

Unfortunately I can't say when it changed, as I was using the Modernizr packaged version. I can't find out which yepnope version was packed with Modernizr 2.5.1, which used to work for me. Modernizr 2.5.3 and yepnope 1.5.3 are different.

Cheers, Thomas.