Callback function when the page was loaded completely
        FYI, this function will be called after $(document).ready()
        in jQuery
194913
def on_notify_load_status(self, webkitView, *args, **kwargs):
        
        status = webkitView.get_load_status()
        if status == status.FINISHED:
            if self.debug is True:
                print 'Load finished'
807566
private function checkCallback() : void
    {
        if (isset($this->onload) && !$this->is_loaded) {
            $this->is_loaded = true;
            call_user_func($this->onload, $this);
        }
    }
898182
function (src, cb) {
      var callbackFct = '__loadjsonp__' + (counter++)
      window[callbackFct] = function () {
        cb.apply(window, arguments)
        delete window[callbackFct]
      }
      this.includeJS(src + (src.indexOf('?') == -1 ? '?' : '&') + 'callback=' + callbackFct, function () {
        // if http request fails (e.g. 404 error / no content)
        setTimeout(window[callbackFct], 10)
      })
    }
227767
function bindOnReady(win, callback, eventUtils) {
      var doc = win.document, event = { type: 'ready' };

      if (eventUtils.domLoaded) {
        callback(event);
        return;
      }

      function isDocReady() {
        // Check complete or interactive state if there is a body
        // element on some iframes IE 8 will produce a null body
        return doc.readyState === "complete" || (doc.readyState === "interactive" && doc.body);
      }

      // Gets called when the DOM is ready
      function readyHandler() {
        if (!eventUtils.domLoaded) {
          eventUtils.domLoaded = true;
          callback(event);
        }
      }

      function waitForDomLoaded() {
        if (isDocReady()) {
          removeEvent(doc, "readystatechange", waitForDomLoaded);
          readyHandler();
        }
      }

      function tryScroll() {
        try {
          // If IE is used, use the trick by Diego Perini licensed under MIT by request to the author.
          // http://javascript.nwbox.com/IEContentLoaded/
          doc.documentElement.doScroll("left");
        } catch (ex) {
          Delay.setTimeout(tryScroll);
          return;
        }

        readyHandler();
      }

      // Use W3C method (exclude IE 9,10 - readyState "interactive" became valid only in IE 11)
      if (doc.addEventListener && !(Env.ie && Env.ie < 11)) {
        if (isDocReady()) {
          readyHandler();
        } else {
          addEvent(win, 'DOMContentLoaded', readyHandler);
        }
      } else {
        // Use IE method
        addEvent(doc, "readystatechange", waitForDomLoaded);

        // Wait until we can scroll, when we can the DOM is initialized
        if (doc.documentElement.doScroll && win.self === win.top) {
          tryScroll();
        }
      }

      // Fallback if any of the above methods should fail for some odd reason
      addEvent(win, 'load', readyHandler);
    }
358540
function(e) {
            if (!_loadComplete) {
                _loadComplete = true;

                // Just in case DOMReady did not go off for some reason
                // E._ready();
                if (Y.fire) {
                    Y.fire(EVENT_READY);
                }

                // Available elements may not have been detected before the
                // window load event fires. Try to find them now so that the
                // the user is more likely to get the onAvailable notifications
                // before the window load notification
                Event._poll();
            }
        }
1305468
function _waitForInterstitialPageLoad() {
        var deferred    = $.Deferred(),
            keepPolling = true,
            timer       = window.setTimeout(function () {
                keepPolling = false;
                deferred.reject();
            }, 10000); // 10 seconds

        /*
         * Asynchronously check to see if the interstitial page has
         * finished loading; if not, check again until timing out.
         */
        function pollInterstitialPage() {
            if (keepPolling && Inspector.connected()) {
                Inspector.Runtime.evaluate("window.isBracketsLiveDevelopmentInterstitialPageLoaded", function (response) {
                    var result = response.result;

                    if (result.type === "boolean" && result.value) {
                        window.clearTimeout(timer);
                        deferred.resolve();
                    } else {
                        window.setTimeout(pollInterstitialPage, 100);
                    }
                });
            } else {
                deferred.reject();
            }
        }

        pollInterstitialPage();
        return deferred.promise();
    }
1164067
function ready() {

    if (!readyFired) {

        // this must be set to true before we start calling callbacks
        readyFired = true;
        var result = null;
        var i = i || 0;

        var handleEvent = function (i, readyList) {

            if ( readyList[i] ) {

                if (readyList[i].name == 'gina') {

                    var scheduler = window.setInterval(function (i, readyList) {
                        try {

                            readyList[i].ctx = window.gina;
                            result = readyList[i].fn.call(window, readyList[i].ctx);

                            // clear
                            if (result) {
                                window.clearInterval(scheduler);
                                ++i;
                                handleEvent(i, readyList)
                            }
                        } catch (err) {
                            window.clearInterval(scheduler);
                            throw err
                        }

                    }, 50, i, readyList);


                } else {
                    readyList[i].fn.call(window, readyList[i].ctx);
                    ++i;
                    handleEvent(i, readyList)
                }

            } else { // end
                // allow any closures held by these functions to free
                readyList = [];
            }
        }

        handleEvent(i, readyList)
    }
}
674418
function() {
    if (_xhr.readyState === 4) {
      var result = Result(_xhr);
      // ready
      __callback_func('ready')(result, _this);
      // success
      if (_xhr.status === 200) __callback_func('success')(result, _this);
      // fail
      else __callback_func('fail')(result, _this);
    }
  }
1136334
function paperLoadedInit() {
  console.log('Paper ready!');

  // Set center adjusters based on size of canvas
  $('#hcenter').attr({
    value: 0,
    min: -(robopaint.canvas.width / 2),
    max: robopaint.canvas.width / 2
  });

  $('#vcenter').attr({
    value: 0,
    min: -(robopaint.canvas.height / 2),
    max: robopaint.canvas.height / 2
  });

  $(window).resize();

  // Use mode settings management on all "managed" class items. This
  // saves/loads settings from/into the elements on change/init.
  mode.settings.$manage('.managed');

  // With Paper ready, send a single up to fill values for buffer & pen.
  mode.run('up');
}
315627
function scriptTag(src, callback)  {
		
		var elem = doc.createElement('script');		
		elem.type = 'text/' + (src.type || 'javascript');
		elem.src = src.src || src;  
			
		elem.onreadystatechange = elem.onload = function() {
			var state = elem.readyState;

			if (!callback.done && (!state || /loaded|complete/.test(state))) {
				callback.call();
				callback.done = true;
			}
			
			// cleanup. IE runs into trouble
			if (!ie) {			
				head.removeChild(elem);
			}
		}; 
		
		head.appendChild(elem); 
	}
1361970
function(ev) {
		if (!ev) { ev = w.event; }
		if (!ev) { ev = { name: "load" }; }
		if(impl.onloadfired) {
			return this;
		}
		impl.fireEvent("page_ready", ev);
		impl.onloadfired = true;
		return this;
	}
1165771
function _load(url) {

    var script = document.createElement('script'),
      done = false;
    script.src = url;

    // Once the script has been loaded remove the tag from the document.
    script.onload = script.onreadystatechange = function() {
      if ( !done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") ) {
        done = true;
        script.onload = script.onreadystatechange = null;
        if ( script && script.parentNode ) {
          script.parentNode.removeChild( script );
        }
      }
    };

    if ( !head ) {
      head = document.getElementsByTagName('head')[0];
    }

    // Actually load script.
    head.appendChild( script );
  }
498157
function process (ev) {
				ev = ev || global.event;
				// detect when it's done loading
				// ev.type == 'load' is for all browsers except IE6-9
				// IE6-9 need to use onreadystatechange and look for
				// el.readyState in {loaded, complete} (yes, we need both)
				if (ev.type == 'load' || readyStates[el.readyState]) {
					delete activeScripts[def.id];
					// release event listeners
					el.onload = el.onreadystatechange = el.onerror = ''; // ie cries if we use undefined
					success();
				}
			}
1075376
function()
			{
				if ( cssIsLoaded && jsIsLoaded )
				{
					// Mark the part as loaded.
					part._isLoaded = 1;

					// Call all pending callbacks.
					for ( var i = 0 ; i < pending.length ; i++ )
					{
						if ( pending[ i ] )
							pending[ i ]();
					}
				}
			}
893019
function() {
        var context = root.serialize;
        var template = root.template;

        // Create a deferred specifically for fetching.
        def = root.deferred();

        // If data is a function, immediately call it.
        if (_.isFunction(context)) {
          context = context.call(root);
        }

        // Set the internal callback to trigger once the asynchronous or
        // synchronous behavior has completed.
        manager.callback = function(contents) {
          // Clean up asynchronous manager properties.
          delete manager.isAsync;
          delete manager.callback;

          done(context, contents);
        };

        // Set the url to the prefix + the view's template property.
        if (typeof template === "string") {
          url = root.prefix + template;
        }

        // Check if contents are already cached and if they are, simply process
        // the template with the correct data.
        if (contents = LayoutManager.cache(url)) {
          done(context, contents, url);

          return def;
        }

        // Fetch layout and template contents.
        if (typeof template === "string") {
          contents = root.fetchTemplate.call(root, root.prefix +
            template);
        // If the template is already a function, simply call it.
        } else if (typeof template === "function") {
          contents = template;
        // If its not a string and not undefined, pass the value to `fetch`.
        } else if (template != null) {
          contents = root.fetchTemplate.call(root, template);
        }

        // If the function was synchronous, continue execution.
        if (!manager.isAsync) {
          done(context, contents);
        }

        return def;
      }
1223054
function finishLoad() {
    // Pick a title, unless one was specified.
    var title = opt_title || this.generateTitleFromEntries_(entries);
    this.mainDisplay_.setTitle(title);

    // Show the document.
    var documentView = this.mainDisplay_.openDocument(doc);
    goog.asserts.assert(documentView);

    // Zoom to fit.
    // TODO(benvanik): remove setTimeout when zoomToFit is based on view.
    wtf.timing.setTimeout(50, function() {
      documentView.zoomToFit();
    }, this);
  }
133190
function whenDocumentReady( callback ) {
   return new Promise( ( resolve, reject ) => {
      function ready() {
         try {
            resolve( callback() );
         }
         catch( err ) {
            reject( err );
         }
      }

      if( document.readyState === 'complete' || document.readyState === 'interactive' ) {
         ready();
      }
      else {
         document.addEventListener( 'DOMContentLoaded', ready );
      }
   } );
}