Page.onShow -> This event is called when a page appears on the screen (everytime).
518836
function onShow(superOnShow) {
  superOnShow();
  
	changeCalendar.call(this, "en", calendarTypes.GREGORIAN, sample, 2);
  
  this.calendar.setSelectedDate({"month":11,"year":2017,"day":1});
	var fn = this.calendar.nextMonth.bind(this.calendar);
	
	// runner.add(fn, "nextMonth");
	// runner.add(fn, "nextMonth2");
	// runner.add(fn, "nextMonth3");
	// runner.add(fn, "nextMonth4");
	// runner.add(fn, "nextMonth5");
	// runner.add(fn, "nextMonth6");
	// runner.add(fn, "nextMonth7");
	// runner.add(fn, "nextMonth8");
	// runner.add(fn, "nextMonth9");
	// runner.add(fn, "nextMonth10");
	
	// runner.add(this.calendar.nextMonth.bind(this.calendar), "nextMonth5");
	// runner.add(this.calendar.nextMonth.bind(this.calendar), "nextMonth6");
	// runner.add(this.calendar.nextMonth.bind(this.calendar), "nextMonth7");
	// runner.add(this.calendar.nextMonth.bind(this.calendar), "nextMonth8");
	// runner.add(this.calendar.nextMonth.bind(this.calendar), "nextMonth9");
	// runner.add(this.calendar.nextMonth.bind(this.calendar), "nextMonth10");
	
	// runner.add(this.calendar.prevMonth.bind(this.calendar), "prevMonth");
	// runner.add(this.calendar.prevMonth.bind(this.calendar), "prevMonth2");
	// runner.add(this.calendar.prevMonth.bind(this.calendar), "prevMonth3");

	// setTimeout(function(){
		runner.runAll(3, function(res){
			res.forEach(function(item, index){
				// console.log(index+":"+item.logs.length);
				console.log(index+":"+item.asString);
				// item.logs.forEach(function(log){
				// });
			});
		});
		
	// }
	// , 3)
  // alert(JSON.stringify(benchmark()))
  // console.log(benchmark());
}
735842
function(element, callback, nowait) {
    var self = this;
    if (!nowait) {
      this.waitForPage(function() {
        self.waitForElement(element, callback, true);
      });
    }
    else {
      var loadWait = function() {
        setTimeout(function() {
          self.waitForElement(element, callback, true);
        }, 100);
      };
      if (nowait) {
        getPage(function(page) {
          page.evaluate(function(element) {
            var element = jQuery(element);
            return ((element.length > 0) && element.is(':visible'));
          }, function(found) {
            if (found) {
              self.debug('Element ' + element + ' found');
              callback.call(self);
            }
            else {
              loadWait();
            }
          }, element);
        });
      }
      else {
        loadWait();
      }
    }
  }
62114
def on_event(self, event):
        
        self._queue.append((event))
        if not self._active and self.plot.document:
            self.plot.document.add_timeout_callback(self.process_on_event, 50)
            self._active = True
727487
function onFullscreenClick() {
		if (requestFullscreen) {
			if (player === fullscreenElement()) {
				// exit fullscreen
				exitFullscreen().call(document);
			} else {
				// enter fullscreen
				requestFullscreen.call(player);

				// maintain focus in internet explorer
				self.fullscreen.focus();

				// maintain focus in safari
				setTimeout(() => {
					self.fullscreen.focus();
				}, 200);
			}
		} else if (media.webkitSupportsFullscreen) {
			// iOS allows fullscreen of the video itself
			if (media.webkitDisplayingFullscreen) {
				// exit ios fullscreen
				media.webkitExitFullscreen();
			} else {
				// enter ios fullscreen
				media.webkitEnterFullscreen();
			}

			onFullscreenChange();
		}
	}
1362937
function EventLoop() {
    var renderCallbacks = [],
        intervalId,
        startInternal = function () {
            intervalId = requestAnimationFrame(startInternal);
            for (var i = 0, n = renderCallbacks.length; i < n; ++i) {
                renderCallbacks[i]();
            }
        };

    this.onRender = function (callback) {
        if (typeof callback === 'function') {
            renderCallbacks.push(callback);
        }
    };
    this.start = function () {
        startInternal();
    };
    this.stop = function () {
        if (intervalId) {
            cancelAnimationFrame(intervalId);
            intervalId = null;
        }
    };
}
1359138
def _on_click(self, event):
        
        if callable(self.__callback):
            self.__callback(self.selection)
893622
function eventHandler(e) {
      if (e.page.path === loader.getPage(pathname).path) {
        emitter.off(`onPostLoadPageResources`, eventHandler)
        clearTimeout(timeoutId)
        window.___history.push(pathname)
      }
    }
1332382
function (e) {
        YAHOO.util.Event.stopEvent(e);
        this.paginator.setPage(this.paginator.getNextPage());
    }
658453
function reloadPage(page, isModal) {

    if (!LiveEditSingleton.enabled()) {
        return;
    }

    var t = frameCommon.topmost();
    if (!t) {
        return;
    }

    if (!page) {
        if (!t.currentEntry || !t.currentEntry.entry) {
            return;
        }
        page = t.currentEntry.entry.moduleName;
        if (!page) {
            return;
        }
    }

    if (LiveEditSingleton.isSuspended()) {
        LiveEditSingleton._suspendedNavigate(page, isModal);
        return;
    }

    if (isModal) {
        reloadModal(page);
        return;
    }

    var ext = "";
    if (!page.endsWith(".js") && !page.endsWith(".xml")) {
        ext = ".js";
    }

    var nextPage;
    if (t._currentEntry && t._currentEntry.entry) {
        nextPage = t._currentEntry.entry;
        nextPage.animated = false;
    } else {
        nextPage = {moduleName: page, animated: false};
    }
    if (!nextPage.context) {
        nextPage.context = {};
    }

    if (t._currentEntry && t._currentEntry.create) {
        nextPage.create = t._currentEntry.create;
    }
    nextPage.context.liveSync = true;
    nextPage.context.liveEdit = true;

    // Disable it in the backstack
    //nextPage.backstackVisible = false;

    // Attempt to Go back, so that this is the one left in the queue
    if (t.canGoBack()) {
        //t._popFromFrameStack();
        t.goBack();
    } else {
        nextPage.clearHistory = true;
    }



    // This should be before we navigate so that it is removed from the cache just before
    // In case the goBack goes to the same page; we want it to return to the prior version in the cache; then
    // we clear it so that we go to a new version.

    __clearRequireCachedItem(LiveEditSingleton.currentAppPath() + page + ext);
    __clearRequireCachedItem(LiveEditSingleton.currentAppPath() + "*" + LiveEditSingleton.currentAppPath() + page);

    if (fileResolver.clearCache) {
        fileResolver.clearCache();
    }

    // Navigate back to this page
    try {
        t.navigate(nextPage);
    }
    catch (err) {
        console.log(err);
    }
}
1244432
void setPage(Page page) {
		synchronized(lock) {
			checkNotFrozen();
			if(this.page != null) throw new IllegalStateException("element already has a page: " + this);
			this.page = page;
		}
		assert checkPageAndParentElement();
	}
1173741
function checkPageViewsCriteria() {

    // don't bother if another box is currently open
    if( isAnyBoxVisible() ) {
        return;
    }

    boxes.forEach(function(box) {
        if( ! box.mayAutoShow() ) {
            return;
        }

        if( box.config.trigger.method === 'pageviews' && pageViews >= box.config.trigger.value ) {
            box.trigger();
        }
    });
}
1210589
function OnScreen(options = { tolerance: 0, debounce: 100, container: window }) {
    this.options = {};
    this.trackedElements = {};

    Object.defineProperties(this.options, {
        container: {
            configurable: false,
            enumerable: false,
            get() {
                let container;

                if (typeof options.container === 'string') {
                    container = document.querySelector(options.container);
                } else if (options.container instanceof HTMLElement) {
                    container = options.container;
                }

                return container || window;
            },
            set(value) {
                options.container = value;
            }
        },
        debounce: {
            get() {
                return parseInt(options.debounce, 10) || 100;
            },
            set(value) {
                options.debounce = value;
            }
        },
        tolerance: {
            get() {
                return parseInt(options.tolerance, 10) || 0;
            },
            set(value) {
                options.tolerance = value;
            }
        }
    });

    Object.defineProperty(this, '_scroll', {
        enumerable: false,
        configurable: false,
        writable: false,
        value: this._debouncedScroll.call(this)
    });

    observeDOM(document.querySelector('body'), () => {
        Object.keys(this.trackedElements).forEach((element) => {
            this.on('enter', element);
            this.on('leave', element);
        });
    });

    this.attach();
}
260248
function () {
            if (!this.eventsAlreadyAttached) {
                this.body = Aria.$window.document.body;
                var map = this._getInitialListenersList();
                for (var i = 0; i < map.length; i++) {
                    this._addListener(map[i].evt, map[i].cb);
                }
                this.eventsAlreadyAttached = true;
            }
        }
304985
function onActivateEvent() {
         if (this.animatedTilesets === undefined) {
           this.animatedTilesets = [];
         }

         if (this.tilesets) {
           var tileset = this.tilesets.tilesets;

           for (var i = 0; i < tileset.length; i++) {
             if (tileset[i].isAnimated) {
               this.animatedTilesets.push(tileset[i]);
             }
           }
         }

         this.isAnimated = this.animatedTilesets.length > 0; // Force pre-render off when tileset animation is used

         if (this.isAnimated) {
           this.preRender = false;
         } // Resize the bounding rect


         this.getBounds().resize(this.width, this.height);
       }
879597
void onRendererSelected() {
        if (view.getRendererSelected() != null) {
            rendererLibrary = rendererManager.getRendererByName(view.getRendererSelected());
            selectCommand.execute();
        }
    }
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;
	}
685296
function (e) {
        if (e.prevValue !== e.newValue) {
            var change = this._state || {},
                state;

            change[e.type.replace(/Change$/,'')] = e.prevValue;
            state = this.getState(change);

            if (state.page !== state.before.page) {
                if (this._batch) {
                    this._pageChanged = true;
                } else {
                    this._firePageChange(state);
                }
            }
        }
    }