examples/QuantumCalc/index.ios.js
// Used by figwheel - uses importScript to load JS rather than <script>'s
Used by figwheel - uses importScript to load JS rather than 
Used by figwheel - uses importScript to load JS rather than
function shimJsLoader() {
  console.info('==== Shimming jsloader ====');
  goog.net.jsloader.load = function(uri, options) {
    var deferred = {
      callbacks: [],
      errbacks: [],
      addCallback: function(cb) {
        deferred.callbacks.push(cb);
      },
      addErrback: function(cb) {
        deferred.errbacks.push(cb);
      },
      callAllCallbacks: function() {
        while (deferred.callbacks.length > 0) {
          deferred.callbacks.shift()();
        }
      },
      callAllErrbacks: function() {
        while (deferred.errbacks.length > 0) {
          deferred.errbacks.shift()();
        }
      }
    };
    setTimeout(function() {
      importJs(uri.getPath(),
               deferred.callAllCallbacks,
               deferred.callAllErrbacks);
    }, 1);
    return deferred;
  };
}
function shimJsLoader ( ) { console . info ( '==== Shimming jsloader ====' ) ; goog . net . jsloader . load = function ( uri , options ) { var deferred = { callbacks : [ ] , errbacks : [ ] , addCallback : function ( cb ) { deferred . callbacks . push ( cb ) ; } , addErrback : function ( cb ) { deferred . errbacks . push ( cb ) ; } , callAllCallbacks : function ( ) { while ( deferred . callbacks . length > 0 ) { deferred . callbacks . shift ( ) ( ) ; } } , callAllErrbacks : function ( ) { while ( deferred . errbacks . length > 0 ) { deferred . errbacks . shift ( ) ( ) ; } } } ; setTimeout ( function ( ) { importJs ( uri . getPath ( ) , deferred . callAllCallbacks , deferred . callAllErrbacks ) ; } , 1 ) ; return deferred ; } ; }
Used by figwheel - uses importScript to load JS rather than <script>'s
Used by figwheel - uses importScript to load JS rather than <script > ' s
// Figwheel needs this to be an async call, // so that it can add callbacks to deferred