Determine if path is valid for history navigation

@param {HTMLElement} el
@param {string} [currentPath]
@returns {boolean}
@private
486875
function _isValid(el, currentPath) {
	// Link has no destination URL
	if (! el.href) { return false; }

	// Link opens a new browser window
	if (el.target === '_blank') { return false; }

	// Link is not absolute URL
	if (! /https?:/.test(el.href)) { return false; }

	// Link is a download
	if (el.hasAttribute('download')) { return false; }

	// Link is supposed to be ignored
	if (el.hasAttribute('data-static')) { return false; }

	// Link is external URL
	if (el.host && el.host !== location.host) { return false; }

	// Link is current page, but with a hash added
	if (el.hash && el.pathname === currentPath) { return false; }

	return true;
}
954993
def elXpath(self, xpath, dom=None):
        """"""
        if dom is None:
            dom = self.browser
        return expect(dom.is_element_present_by_xpath, args=[xpath])
691109
function (element) {
    var currentNode = element.parentNode
    while (currentNode) {
      if (currentNode.tagName === 'HTML') {
        return true
      }
      if (currentNode.nodeType === 11) {
        return false
      }
      currentNode = currentNode.parentNode
    }
    return false
  }
1177085
function isValidPath(path, allowDots)
	{
		if (typeof path !== 'string')
			return false;
		if (!path)
			return false;
		if (!/^([a-z]:[\/\\])?[a-z0-9_~\/\.\-]+$/i.test(path))
			return false;
		if (!allowDots && /^\.{1,2}$/.test(path))
			return false;

		return true;
	}
163336
function isForwardByArray (to, from) {
  // 根据 fullPath 判断当前页面是否访问过，如果访问过，则属于返回

  let index = HISTORY_STACK.indexOf(to.fullPath)
  if (index !== -1) {
    HISTORY_STACK.length = index + 1
    return false
  }

  return true
}
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();
    }
1281589
def is_current(self, paths=None):
        """'"""
        version = self.get_version(paths)
        if version is None:
            return False
        return self.version_ok(version)
639445
function listen(listener) {
    // TODO: Only use a single history listener. Otherwise we'll
    // end up with multiple concurrent calls to match.
    return history.listen(function (location) {
      if (state.location === location) {
        listener(null, state)
      } else {
        match(location, function (error, redirectLocation, nextState) {
          if (error) {
            listener(error)
          } else if (redirectLocation) {
            history.transitionTo(redirectLocation)
          } else if (nextState) {
            listener(null, nextState)
          } else {
            warning(
              false,
              'Location "%s" did not match any routes',
              location.pathname + location.search + location.hash
            )
          }
        })
      }
    })
  }
338831
function fullPath(el){
  var names = [];
  while (el.parentNode){
    if (el.id){
      names.unshift('#'+el.id);
      break;
    }else{
      if (el==el.ownerDocument.documentElement) names.unshift(el.tagName);
      else{
        for (var c=1,e=el;e.previousElementSibling;e=e.previousElementSibling,c++);
        names.unshift(el.tagName+":nth-child("+c+")");
      }
      el=el.parentNode;
    }
  }
  return names.join(" > ");
}
759966
private boolean isMap(PropertyPath path) {
        if (schemaRoot != null) {
            Schema schema = this.schemaRoot.find(path);
            return schema != null && (schema.hasChild(NodeId.ANY_KEY) || schema.hasChild(NodeId.ANY));
        }
        return false;
    }
1086707
@Override
  public boolean isHistoryEnabled() {
    if (log.isDebugEnabled()) {
      log.debug("Current history level: {}", historyLevel);
    }
    return !historyLevel.equals(HistoryLevel.NONE);
  }
816057
function checkPath(path) {
    const integerKeySegments =
        path.filter(segment => (/^(0|[1-9][0-9]*)$/.test(segment)));
    if (integerKeySegments.length) {
        warn(`Integer keys will come first in object iteration even if ` +
             `other keys are defined before. Wrap key with '/' to avoid ` +
             `this behavior (${
                integerKeySegments
                    .map(segment => `"${segment}" => "/${segment}/"`).join(', ')
              }).`);
    }
}
57019
function(options) {
      if (History.started) throw new Error("Backbone.history has already been started");
      History.started = true;

      // Figure out the initial configuration. Do we need an iframe?
      // Is pushState desired ... is it available?
      this.options          = _.extend({}, {root: '/'}, this.options, options);
      this.root             = this.options.root;
      this._wantsHashChange = this.options.hashChange !== false;
      this._wantsPushState  = !!this.options.pushState;
      this._hasPushState    = !!(this.options.pushState && this.history && this.history.pushState);
      var fragment          = this.getFragment();
      var docMode           = document.documentMode;
      var oldIE             = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));

      // Normalize root to always include a leading and trailing slash.
      this.root = ('/' + this.root + '/').replace(rootStripper, '/');

      if (oldIE && this._wantsHashChange) {
        this.iframe = Backbone.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
        this.navigate(fragment);
      }

      // Depending on whether we're using pushState or hashes, and whether
      // 'onhashchange' is supported, determine how we check the URL state.
      if (this._hasPushState) {
        Backbone.$(window).on('popstate', this.checkUrl);
      } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
        Backbone.$(window).on('hashchange', this.checkUrl);
      } else if (this._wantsHashChange) {
        this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
      }

      // Determine if we need to change the base url, for a pushState link
      // opened by a non-pushState browser.
      this.fragment = fragment;
      var loc = this.location;
      var atRoot = loc.pathname.replace(/[^\/]$/, '$&/') === this.root;

      // If we've started off with a route from a `pushState`-enabled browser,
      // but we're currently in a browser that doesn't support it...
      if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !atRoot) {
        this.fragment = this.getFragment(null, true);
        this.location.replace(this.root + this.location.search + '#' + this.fragment);
        // Return immediately as browser will do redirect to new url
        return true;

      // Or if we've started out with a hash-based route, but we're currently
      // in a browser where it could be `pushState`-based instead...
      } else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) {
        this.fragment = this.getHash().replace(routeStripper, '');
        this.history.replaceState({}, document.title, this.root + this.fragment + loc.search);
      }

      if (!this.options.silent) return this.loadUrl();
    }
248302
function isValid (path, entry) {
        var isValid = valid(path)
        if (isValid) {
          log.verbose('extracted file from tarball', path)
          extractCount++
        } else {
          // invalid
          log.silly('ignoring from tarball', path)
        }
        return isValid
      }
758904
function isForwardByHistory () {
  // 如果访问的页面state和之前访问过的页面相同，则属于返回

  let index = HISTORY_STATE_STACK.indexOf(getHistoryStateKey())

  if (index !== HISTORY_STATE_STACK.length - 1 && index !== -1) {
    HISTORY_STATE_STACK.length = index + 1
    return false
  }

  return true
}
399648
function(filePath, currentPath){
	if(/^(?:\/|[a-zA-Z]:(?:\/|\\))/.test(filePath)){ // Is the path absolute?
		filePath = path.normalize(filePath);
	}else{ // Relative paths need to be resolved first
		filePath = path.resolve(currentPath, filePath);
	}
	return filePath;
}
26938
function (path, context) {
        if (!path || typeof(path) != 'string') {
            Aria.$logError(Aria.NULL_CLASSPATH);
            return false;
        }
        var classpathParts = path.split('.'), nbParts = classpathParts.length;
        for (var index = 0; index < nbParts - 1; index++) {
            if (!__checkPackageName(classpathParts[index], context)) {
                return false;
            }
        }
        if (!__checkClassName(classpathParts[nbParts - 1], context)) {
            return false;
        }
        return true;
    }