code: function refresh(element) {
    const url = window.location.href;
    let match;
    if (element.areaLink) {
      // Match prefix
      let prefix = element.href;
      // If prefix doesn't end in slash, add a slash.
      // We want to avoid matching in the middle of a folder name.
      if (prefix.length < url.length && prefix.substr(-1) !== '/') {
        prefix += '/';
      }
      match = (url.substr(0, prefix.length) === prefix);
    } else {
      // Match whole path
      match = (url === element.href);
    }
    element.current = match;
  }
docs: Update the current status of the element based on the current location.