From b1916b3e3650810a935aea97f543b8192b7246fb Mon Sep 17 00:00:00 2001 From: zcorpan Date: Tue, 28 Jan 2025 17:20:19 +0100 Subject: [PATCH 1/2] Fire a load event for javascript: URL non-strings Fixes #1895. --- source | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/source b/source index 864a982e0de..e4f94efefb9 100644 --- a/source +++ b/source @@ -33620,8 +33620,9 @@ interface HTMLIFrameElement : HTMLElement {
  • Navigate element's content navigable to url using element's node document, with historyHandling set to historyHandling, referrerPolicy set to referrerPolicy, and documentResource set to srcdocString.

  • + data-x="navigation-referrer-policy">referrerPolicy set to referrerPolicy, documentResource set to srcdocString, and javascriptURLLoadEvent set to true.

    Each Document has an iframe load in progress flag and a mute @@ -100390,8 +100391,10 @@ location.href = '#foo'; policy referrerPolicy (default the empty string), an optional user navigation involvement userInvolvement (default "none"), and an optional Element sourceElement (default null):

    + data-x="uni-none">none"), an optional Element sourceElement (default null), and an + optional boolean javascriptURLLoadEvent (default false):

    1. Let cspNavigationType be "form-submission" if @@ -100567,7 +100570,8 @@ location.href = '#foo'; source given navigable's active window to navigate to a javascript: URL given navigable, url, historyHandling, initiatorOriginSnapshot, - userInvolvement, and cspNavigationType.

    2. + userInvolvement, cspNavigationType, and + javascriptURLLoadEvent.

    3. Return.

    @@ -100942,8 +100946,8 @@ location.href = '#foo';

    To navigate to a javascript: URL, given a navigable targetNavigable, a URL url, a history handling behavior historyHandling, an origin initiatorOrigin, a - user navigation involvement userInvolvement, and a string - cspNavigationType:

    + user navigation involvement userInvolvement, a string + cspNavigationType, and a boolean loadEvent:

    1. Assert: historyHandling is " url, initiatorOrigin, and userInvolvement.

    2. -

      If newDocument is null, then return.

      +

      If newDocument is null, then:

      + +
        +
      1. If loadEvent is true, then run the iframe load event steps + given targetNavigable's container.

      2. + +
      3. Return.

      4. +

      In this case, some JavaScript code was executed, but no new Document was created, so we will not perform a navigation.

      From cc020206d5dda602c9a17ba4dca8419f99e9ec51 Mon Sep 17 00:00:00 2001 From: zcorpan Date: Tue, 4 Feb 2025 14:47:43 +0100 Subject: [PATCH 2/2] Use --- source | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source b/source index e4f94efefb9..be5eac3588a 100644 --- a/source +++ b/source @@ -100394,7 +100394,8 @@ location.href = '#foo';
      data-x="uni-none">none"), an optional Element sourceElement (default null), and an optional boolean javascriptURLLoadEvent (default false):

      + data-x="navigation-javascript-url-load-event">javascriptURLLoadEvent (default + false):

      1. Let cspNavigationType be "form-submission" if