Internal method called when the web browser navigates
183335
def navigated
      url = get_location
      @params = []

      idx = match(path_to_parts(decode(url.pathname)), decode(url.search))

      if idx
        @routes[idx][:callback].call(@params)
      else
        @page404.call(url.pathname)
      end
    end
1135027
function() {
		if (!ready) {
			ready = true;
			//Call the stack of onload functions in given context or window object
			for (var i=0, len=stack.length; i < len; i++) {
				stack[i][0].call(stack[i][1]);	
			}
			//Clean up after the DOM is ready
			if (document.removeEventListener) {
				document.removeEventListener("DOMContentLoaded", onStateChange, false);
			}
			//Clear the interval	
			clearInterval(timer);
			//Null the timer and event handlers to release memory
			document.onreadystatechange = window.onload = timer = null;
		}
	}
290173
private void go() {
        if (navigateEvent != null) {
            navigationManager.postEvent2C(navigateEvent);

            if (navigationManager.logger.isTraceEnabled()) {
                if (navigateEvent instanceof NavigationManager.Event.OnLocationForward) {
                    NavigationManager.Event.OnLocationForward event = (NavigationManager.Event.OnLocationForward) navigateEvent;
                    String lastLocId = event.getLastValue() == null ? null
                            : event.getLastValue().getLocationId();
                    navigationManager.logger.trace("Nav Manager: Forward: {} -> {}", lastLocId,
                            event.getCurrentValue().getLocationId());
                }
            }

            if (navigateEvent instanceof NavigationManager.Event.OnLocationBack) {
                if (navigationManager.logger.isTraceEnabled()) {
                    NavigationManager.Event.OnLocationBack event = (NavigationManager.Event.OnLocationBack) navigateEvent;
                    NavLocation lastLoc = event.getLastValue();
                    NavLocation currentLoc = event.getCurrentValue();
                    navigationManager.logger.trace("Nav Manager: Backward: {} -> {}",
                            lastLoc.getLocationId(),
                            currentLoc == null ? "null" : currentLoc.getLocationId());
                }

                checkAppExit(sender);
            }
        }
        dumpHistory();
    }
1214346
public void click() {
        String cantClick = "Unable to click ";
        String action = "Clicking " + prettyOutput();
        String expected = prettyOutputStart() + " is present, displayed, and enabled to be clicked";
        try {
            if (isNotPresentDisplayedEnabled(action, expected, cantClick)) {
                return;
            }
            WebElement webElement = getWebElement();
            webElement.click();
        } catch (Exception e) {
            reporter.fail(action, expected, cantClick + prettyOutputEnd() + e.getMessage());
            log.warn(e);
            return;
        }
        reporter.pass(action, expected, "Clicked " + prettyOutputEnd().trim());
    }
963094
public void navigation(Activity mContext, int requestCode, NavigationCallback callback) {
        ARouter.getInstance().navigation(mContext, this, requestCode, callback);
    }
229737
function() {
    // Walk all of the elements in the DOM (try to only do this once)
    var elements = doc.getElementsByTagName('*');
    var re = /url\((http.*)\)/ig;
    for (var i = 0; i < elements.length; i++) {
      var el = elements[i];
      var style = win.getComputedStyle(el);

      // check for Images
      if (el.tagName == 'IMG') {
        CheckElement(el, el.src);
      }
      // Check for background images
      if (style['background-image']) {
        re.lastIndex = 0;
        var matches = re.exec(style['background-image']);
        if (matches && matches.length > 1)
          CheckElement(el, matches[1]);
      }
      // recursively walk any iFrames
      if (el.tagName == 'IFRAME') {
        try {
          var rect = GetElementViewportRect(el);
          if (rect) {
            var tm = RUMSpeedIndex(el.contentWindow);
            if (tm) {
              rects.push({'tm': tm,
                          'area': rect.area,
                          'rect': rect});
            }
        }
        } catch(e) {
        }
      }
    }
  }
1099284
function(e) {
      var current = this.getFragment();
      if (current === this.fragment && this.iframe) {
        current = this.getFragment(this.getHash(this.iframe));
      }
      if (current === this.fragment) return false;
      if (this.iframe) this.navigate(current);
      this.loadUrl();
    }
833212
function() {
            if (this.locked) {
                return;
            }

            if (Y.UA.ie && !YUI.Env.DOMReady) {
                // Hold off if DOMReady has not fired and check current
                // readyState to protect against the IE operation aborted
                // issue.
                this.startInterval();
                return;
            }

            this.locked = true;

            // keep trying until after the page is loaded.  We need to 
            // check the page load state prior to trying to bind the 
            // elements so that we can be certain all elements have been 
            // tested appropriately
            var i, len, item, el, notAvail, executeItem,
                tryAgain = !_loadComplete;

            if (!tryAgain) {
                tryAgain = (_retryCount > 0);
            }

            // onAvailable
            notAvail = [];

            executeItem = function (el, item) {
                var context, ov = item.override;
                if (item.compat) {
                    if (item.override) {
                        if (ov === true) {
                            context = item.obj;
                        } else {
                            context = ov;
                        }
                    } else {
                        context = el;
                    }
                    item.fn.call(context, item.obj);
                } else {
                    context = item.obj || Y.one(el);
                    item.fn.apply(context, (Y.Lang.isArray(ov)) ? ov : []);
                }
            };

            // onAvailable
            for (i=0,len=_avail.length; i<len; ++i) {
                item = _avail[i];
                if (item && !item.checkReady) {

                    // el = (item.compat) ? Y.DOM.byId(item.id) : Y.one(item.id);
                    el = (item.compat) ? Y.DOM.byId(item.id) : Y.Selector.query(item.id, null, true);

                    if (el) {
                        executeItem(el, item);
                        _avail[i] = null;
                    } else {
                        notAvail.push(item);
                    }
                }
            }

            // onContentReady
            for (i=0,len=_avail.length; i<len; ++i) {
                item = _avail[i];
                if (item && item.checkReady) {

                    // el = (item.compat) ? Y.DOM.byId(item.id) : Y.one(item.id);
                    el = (item.compat) ? Y.DOM.byId(item.id) : Y.Selector.query(item.id, null, true);

                    if (el) {
                        // The element is available, but not necessarily ready
                        // @todo should we test parentNode.nextSibling?
                        if (_loadComplete || (el.get && el.get('nextSibling')) || el.nextSibling) {
                            executeItem(el, item);
                            _avail[i] = null;
                        }
                    } else {
                        notAvail.push(item);
                    }
                }
            }

            _retryCount = (notAvail.length === 0) ? 0 : _retryCount - 1;

            if (tryAgain) {
                // we may need to strip the nulled out items here
                this.startInterval();
            } else {
                clearInterval(this._interval);
                this._interval = null;
            }

            this.locked = false;

            return;

        }
134445
public void scrollTo() {
        String action = "Scrolling screen to " + prettyOutput();
        String expected = prettyOutputStart() + " is now within the current viewport";
        try {
            // wait for element to be present
            if (isNotPresent(action, expected, CANT_SCROLL)) {
                return;
            }
            // perform the move action
            WebElement webElement = getWebElement();
            Actions builder = new Actions(driver);
            builder.moveToElement(webElement);
        } catch (Exception e) {
            cantScroll(e, action, expected);
            return;
        }
        isScrolledTo(action, expected);
    }
252181
def navigation_behavior(error)
      if get?
        raise error
      elsif has_errors? && default_action
        render rendering_options
      else
        redirect_to navigation_location
      end
    end
353283
function (callback) {
      var _this = this;

      var guid = _emberMetalUtils.guidFor(this);

      _emberViewsSystemJquery.default(window).on('popstate.ember-location-' + guid, function (e) {
        // Ignore initial page load popstate event in Chrome
        if (!popstateFired) {
          popstateFired = true;
          if (_this.getURL() === _this._previousURL) {
            return;
          }
        }
        callback(_this.getURL());
      });
    }
1166071
function(e) {
      var redirectedEvent = document.createEvent('MouseEvents');
      redirectedEvent.initMouseEvent(e.type, e.bubbles, e.cancelable, window,
          e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey,
          e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
      this.dialog_.dispatchEvent(redirectedEvent);
      e.stopPropagation();
    }
494170
function _onFrameNavigated(event, res) {
        // res = {frame}
        var url = res.frame.url,
            baseUrl,
            baseUrlRegExp;

        // Only check domain of root frame (with undefined parentId)
        if (res.frame.parentId) {
            return;
        }

        // Any local file is OK
        if (url.match(/^file:\/\//i) || !_server) {
            return;
        }

        // Need base url to build reg exp
        baseUrl = _server.getBaseUrl();
        if (!baseUrl) {
            return;
        }

        // Test that url is within site
        baseUrlRegExp = new RegExp("^" + StringUtils.regexEscape(baseUrl), "i");
        if (!url.match(baseUrlRegExp)) {
            // No longer in site, so terminate live dev, but don't close browser window
            _close(false, "navigated_away");
        }
    }
110308
public void reload() {

        if (m_handler != null) {
            String uri = Window.Location.getHref();
            m_handler.leavePage(uri);
        } else {
            Window.Location.reload();
        }
    }
214037
public void visit(final WebAppListener webAppListener) {
		NullArgumentException.validateNotNull(webAppListener,
				"Web app listener");
		try {
			final EventListener listener = RegisterWebAppVisitorHS.newInstance(
					EventListener.class, bundleClassLoader,
					webAppListener.getListenerClass());
			webAppListener.setListener(listener);
			webContainer.registerEventListener(listener, httpContext);
			//CHECKSTYLE:OFF
		} catch (Exception ignore) {
			LOG.error(REGISTRATION_EXCEPTION_SKIPPING, ignore);
		}
		//CHECKSTYLE:ON
	}
440194
function _onFrameNavigated(event, res) {
        // res = {frame}
        // Re-inject RemoteFunctions when navigating to a new page, but not if an iframe was loaded
        if (res.frame.parentId) {
            return;
        }

        _stopKeepAliveInterval();

        // inject RemoteFunctions
        var command = "window._LD=" + RemoteFunctions + "(" + JSON.stringify(LiveDevelopment.config) + "," + PreferencesManager.get("livedev.wsPort") + ");";

        Inspector.Runtime.evaluate(command, function onEvaluate(response) {
            if (response.error || response.wasThrown) {
                _load.reject(response.error);
            } else {
                _objectId = response.result.objectId;
                _load.resolve();

                _startKeepAliveInterval();
            }
        });
    }
906
function () {
                var element = this.getElement();
                // This is to handle if there is a scroll
                element.onselectstart = Aria.returnTrue;
                if (this.overlay) {
                    // remove overlay here
                    this.overlay.$dispose();
                    this.overlay = null;
                }
                if (this.proxy && this.proxy.overlay) {
                    element.style.top = (this._elementInitialPosition.top + this._movableGeometry.y - this._movableInitialGeometry.y)
                            + "px";
                    element.style.left = (this._elementInitialPosition.left + this._movableGeometry.x - this._movableInitialGeometry.x)
                            + "px";
                    this.proxy.$dispose();
                    this.proxy = null;
                }

                this.$raiseEvent("dragend");
            }