When page load is finished
332467
function(status) {

      // Page is now opened
      pageInformation.isOpened = true;
      pageInformation.status = status;

      // Failing
      if (status !== 'success') {
        parent.replyTo(callId, wrapFailure('fail'));
        return cleanup();
      }

      // Wrong status code
      if (!pageInformation.response.status || pageInformation.response.status >= 400) {
        parent.replyTo(callId, wrapFailure('status'));
        return cleanup();
      }

      // Waiting for body to load
      page.evaluateAsync(function() {
        var interval = setInterval(function() {
          if (document.readyState === 'complete' || document.readyState === 'interactive') {
            clearInterval(interval);
            window.callPhantom({
              head: 'documentReady',
              body: true,
              passphrase: 'detoo'
            });
          }
        }, 30);
      });
    }
1124320
function(){
		var loaded = FuncUnit.win.document.readyState === "complete" && 
				     FuncUnit.win.location.href != "about:blank" &&
				     FuncUnit.win.document.body;
		return loaded;
	}
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'
1075468
function (r) {
            // If DONE (cancelled), then don't do anything
            if (me._readyState === FileReader.DONE) {
                return;
            }

            // DONE state
            me._readyState = FileReader.DONE;

            if (r instanceof Array) {
                r = new Uint8Array(r).buffer;
            }
            me._result = r;

            // If onload callback
            if (typeof me.onload === 'function') {
                me.onload(new ProgressEvent('load', { target:me }));
            }

            // If onloadend callback
            if (typeof me.onloadend === 'function') {
                me.onloadend(new ProgressEvent('loadend', { target:me }));
            }
        }
742696
function onPagerendered(obj) {
        cache[obj.url] = {
            resource: obj.resource,
            time: Date.now()
        };

        //page render end
        trigger('onpagerendercomplete',{
            url : obj.url
        });
    }
685319
function(callback){
    var self = this;

    // if we have no pages just fire callback
    if(self.pageCollection.length === 0){
      callback(self);
    }

    // this is called once a page is fully parsed
    whenPageIsFetched = function(){
      self.completed ++;
      if(self.completed === self.pageCollection.length){
        callback(self);
      } else {
        findUnfetchedPages();
      }  
    }

    findUnfetchedPages = function(){ 
      _.each(self.pageCollection, function (page) {
        if (page.status === "unfetched") {
          page.fetch(whenPageIsFetched);
        }
      });
    },

    findUnfetchedPages();
  }
901052
function (e) {
			var $progress = $('.progress:first', this.$el),
					complete;

			if (e.lengthComputable) {
				complete = e.loaded / e.total * 100;
				complete = complete ? complete : 0;
				$progress.attr('value', complete);
				$progress.html(complete);
			}
		}
682918
function() {
        this.logger.log(this.index + " loadComplete, children: " + this.children.length);
        this.getChildrenEl().innerHTML = this.completeRender();
		if (this.propagateHighlightDown) {
			if (this.highlightState === 1 && !this.tree.singleNodeHighlight) {
				for (var i = 0; i < this.children.length; i++) {
				this.children[i].highlight(true);
			}
			} else if (this.highlightState === 0 || this.tree.singleNodeHighlight) {
				for (i = 0; i < this.children.length; i++) {
					this.children[i].unhighlight(true);
				}
			} // if (highlighState == 2) leave child nodes with whichever highlight state they are set
		}
				
        this.dynamicLoadComplete = true;
        this.isLoading = false;
        this.expand(true);
        this.tree.locked = false;
    }
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 ]();
					}
				}
			}
659856
function loadedListener() {
            var readyState = script.readyState;
            if (
                typeof readyState === 'undefined'
                || /^(loaded|complete)$/.test( readyState )
            ) {
                script.onload = script.onreadystatechange = null;
                script = null;

                completePreDefine( moduleId );
            }
        }
520545
function completed( event ) {
	        // readyState === "complete" is good enough for us to call the dom ready in oldIE
	        if ( w3c || event.type === LOAD || doc[READYSTATE] === COMPLETE ) {
	            detach();
	            ready();
	        }
	    }
327287
function whenReady(funcToExecute) {
    if (isReady()) {
        logger.info('Page is already loaded, instantly executing!');
        funcToExecute();
        return;
    }

    logger.info('Waiting for page to be ready');
    callbacksOnReady.push(funcToExecute);
}
83314
function() {
			this._loaded = true;
			dobrodcast(gui.BROADCAST_TOLOAD, gui.BROADCAST_ONLOAD);
			doaction(gui.ACTION_DOC_ONLOAD, location.href);
		}
269287
function (data) {
            if (!ready) {
                return;
            }
            var i;
            if (data.all === true) {
                data.upto = numPages;
            }
            if (data.page) {
                this.queuePageToLoad(data.page - 1);
            } else if (data.upto) {
                for (i = 0; i < data.upto; ++i) {
                    this.queuePageToLoad(i);
                }
            }
        }
903782
def on_finished(self):
        """"""
        self.controller.is_running = False

        error = self.controller.current_error
        if error is not None:
            self.info(self.tr("Stopped due to error(s), see Terminal."))
        else:
            self.info(self.tr("Finished successfully!"))
948956
function onReady( event ) {
  // bail if already triggered or IE8 document is not ready just yet
  var isIE8NotReady = event.type === 'readystatechange' && document.readyState !== 'complete';
  if ( docReady.isReady || isIE8NotReady ) {
    return;
  }

  trigger();
}
1071471
function domReady(callback) {
    if (doc.readyState === "complete" || (doc.readyState !== "loading" && !doc.documentElement.doScroll))
        setTimeout(() => callback && callback(), 0)
    else {
        let handler = () => {
            doc.removeEventListener("DOMContentLoaded", handler, false)
            win.removeEventListener("load", handler, false)
            callback && callback()
        }
        doc.addEventListener("DOMContentLoaded", handler, false)
        win.addEventListener("load", handler, false)
    }
}