diff --git a/source b/source index 315e77657e4..a6080500583 100644 --- a/source +++ b/source @@ -3328,7 +3328,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute parent, and fallbackRegistry, and the concept of cloning steps -
  • The concept of base URL change steps and the definition of what happens when an element is affected by a base URL change
  • The concept of an element's unique identifier (ID)
  • The concept of an element's classes
  • The term supported tokens
  • @@ -7216,6 +7215,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute data-x="strip leading and trailing ASCII whitespace">stripping leading and trailing ASCII whitespace from it, it is a valid non-empty URL.

    +
    +

    This specification defines the URL about:legacy-compat as a reserved, though unresolvable, about: URL, for use in DOCTYPEs in HTML documents when needed for @@ -7231,46 +7232,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute document">iframe srcdoc documents. ABOUT

    -

    The fallback base URL of a Document object document is the - URL record obtained by running these steps:

    - -
      -
    1. -

      If document is an iframe - srcdoc document, then:

      - -
        -
      1. Assert: document's about base URL is non-null.

      2. - -
      3. Return document's about base - URL.

      4. -
      -
    2. - -
    3. If document's URL matches - about:blank and document's about base URL is non-null, then return - document's about base URL.

    4. - - - -
    5. Return document's URL.

    6. -
    - -

    The document base URL of a Document object is the - URL record obtained by running these steps:

    - -
      -
    1. If there is no base element that has an href attribute in the Document, then return the - Document's fallback base URL.

    2. - -
    3. Otherwise, return the frozen base URL of the first base element - in the Document that has an href attribute, in - tree order.

    4. -
    -

    A URL matches about:blank if its -

    Dynamic changes to base URLs

    +

    Document base URLs

    -

    When a document's document base URL changes, all elements in that document are - affected by a base URL change.

    +

    The document base URL of a Document document is the + URL record obtained by running these steps:

    -

    The following are base URL change steps, which run when an element is - affected by a base URL change (as defined by DOM):

    +
      +
    1. If document has no descendant base element that has + an href attribute, then return document's + fallback base URL.

    2. -
      +
    3. Otherwise, return the frozen base URL of the first base element + in document that has an href attribute, in + tree order.

    4. +
    -
    If the element creates a hyperlink
    +

    The fallback base URL of a Document object document is the + URL record obtained by running these steps:

    -
    -

    If the URL identified by the hyperlink is being shown to the user, or if any - data derived from that URL is affecting the display, then the href attribute's value should be reparsed, relative to the element's node - document and the UI updated appropriately.

    +
      +
    1. +

      If document is an iframe + srcdoc document:

      -

      For example, the CSS :link/:visited pseudo-classes - might have been affected.

      +
        +
      1. Assert: document's about base URL is non-null.

      2. -

        If the hyperlink has a ping attribute and its - URL(s) are being shown to the user, then the ping attribute's tokens should be reparsed, relative to the element's node - document and the UI updated appropriately.

        -
    +
  • Return document's about base + URL.

  • + + -
    If the element is a q, blockquote, ins, or - del element with a cite attribute
    +
  • If document's URL matches + about:blank and document's about base URL is non-null, then return + document's about base + URL.

  • -
    -

    If the URL identified by the cite attribute is being - shown to the user, or if any data derived from that URL is affecting the display, - then the cite attribute's value should be reparsed, relative to the element's node document and the UI updated - appropriately.

    -
    + -
    Otherwise
    +
  • Return document's URL.

  • + -
    -

    The element is not directly affected.

    +
    -

    For instance, changing the base URL doesn't affect the image displayed by - img elements, although subsequent accesses of the src IDL attribute from script will return a new absolute - URL that might no longer correspond to the image being shown.

    -
    - +

    To set the URL for a Document document to a URL + record url:

    + +
      +
    1. Set document's URL to + url.

    2. + +
    3. Respond to base URL changes given document.

    4. +
    + +

    To respond to base URL changes for a + Document document:

    + +
      +
    1. The user agent should update any user interface elements which are displaying affected + URLs, or data derived from such URLs, to the user. Examples of such user interface elements would + be a status bar that displays a hyperlink's url, or some user interface which displays the URL + specified by a q, blockquote, ins, or del + element's cite attribute.

    2. + +
    3. Ensure that the CSS :link/:visited/etc. pseudo-classes + are updated appropriately.

    4. +
    + +

    This means that changing the base + URL doesn't affect, for example, the image displayed by img elements. Thus, + subsequent accesses of the src IDL attribute from script will + return a new absolute URL that might no longer correspond to the image being + shown.

    @@ -15279,6 +15264,8 @@ interface HTMLBaseElement : HTMLElement {
  • Set element's frozen base URL to urlRecord.

  • + +
  • Respond to base URL changes given document.

  • The href IDL @@ -103093,8 +103080,7 @@ location.href = '#foo'; state given document and newEntry.

  • -

    Set document's URL to - newURL.

    +

    Set the URL given document to newURL.

    Since this is neither a navigation nor a history traversal, it does not cause a