• Creates an URL based on original one, but with hash substituted by the given hash URL.

    The hash URL is substituted as following:

    1. If the hash URL's origin is not the same as the one of the base one, or if it contains a username, then absolute hash URL is substituted:
    2. Otherwise:
      • pathname is substituted, unless it is equal to / and no hash and search parameters present,
      • search parameters are substituted when at least one present,
      • hash is substituted only when present.

    Input URLs are never altered.

    Returns

    URL with updated hash.

    Parameters

    • url: URL

      Base URL.

    • hashURL: URL

      Hash URL to substitute.

    Returns URL

Generated using TypeDoc