title: override setTimeout in require.js
body: <p>we are using require.js in our project and we need to override the <strong>setTimeout</strong> in line 705 , this is the code which we need to <strong>ignore/omit somehow</strong> this setTimeout at all(I mean run over it) ,the problem that if I change it in the open source code explicit when I change version the code will be lost,How should I override this setTimout from outside only for the require.js file and keep it as long as I use this lib, is it possible to do it in <strong>elegant</strong> way in JS globally ?</p>
  
  <p><a href="https://github.com/jrburke/requirejs/blob/master/require.js" rel="nofollow noreferrer">https://github.com/jrburke/requirejs/blob/master/require.js</a></p>
  
  <p>This is line 705 </p>
  
  <pre><code>        //If still waiting on loads, and the waiting load is something
          //other than a plugin resource, or there are still outstanding
          //scripts, then just try back later.
          if ((!expired || usingPathFallback) &amp;&amp; stillLoading) {
              //Something is still waiting to load. Wait for it, but only
              //if a timeout is not already in effect.
              if ((isBrowser || isWebWorker) &amp;&amp; !checkLoadedTimeoutId) {
                  checkLoadedTimeoutId = setTimeout(function () {
                      checkLoadedTimeoutId = 0;
                      checkLoaded();
                  }, 50);
              }
          }
  </code></pre>
  
  <p>FYI ,The reason that we do it is 
  <a href="https://stackoverflow.com/questions/6032429/chrome-timeouts-interval-suspended-in-background-tabs">Chrome: timeouts/interval suspended in background tabs?</a></p>