YepNopeJS: callback triggered before tiny JS file is fully loaded
问题 I've got a site which is loading all kinds of external scripts using Modernizr.load (aka YepNopeJS). One of those scripts is a small statistics script (3,5 kB uncompressed) with a very simple callback function: Modernizr.load({ load: 'http://res.xtractor.no/x.js', callback: function() { _pxReg(); } }); _pxReg is simply a function defined in the x.js script. In about 50% of my pages, I receive an error message "Undefined variable: _pxReg" (Opera 12) or "'_pxReg' is undefined" (Internet