From cc36e137e081ef5bd538eae4750abe8129f37986 Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Wed, 16 Oct 2024 11:46:06 +0900 Subject: [PATCH] Guard showModal() and showPopover() with fully active checks Closes #10659. This effectively only impacts dialogs and popovers "synthetic" documents, such as those created via document.implementation.createHTMLDocument(). --- source | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/source b/source index 7934d736e89..78982f8286b 100644 --- a/source +++ b/source @@ -61620,6 +61620,9 @@ interface HTMLDialogElement : HTMLElement {
  • If this has an open attribute, then throw an "InvalidStateError" DOMException.

  • +
  • If this's node document is not fully active, then + throw an "InvalidStateError" DOMException.

  • +
  • If this is not connected, then throw an "InvalidStateError" DOMException.

  • @@ -61649,9 +61652,8 @@ interface HTMLDialogElement : HTMLElement { to the top layer given this.

  • -

    If this's node document is fully active, then set - this's close watcher to the result of - establishing a close watcher given +

    Set this's close watcher to the + result of establishing a close watcher given this's relevant global object, with:

    - -

    It would be better if this method failed early for the non-fully - active case. That is being tracked in issue #10659.

  • Set this's previously focused element to the @@ -85397,10 +85395,9 @@ dictionary DragEventInit : MouseEventInit {

  • -

    If document is fully active, then set element's - popover close watcher to the result of establishing a close watcher given element's relevant global - object, with:

    +

    Set element's popover close watcher to the result of establishing a close watcher given + element's relevant global object, with:

    - -

    It would be better if this algorithm failed early for the non-fully - active case. That is being tracked in issue #10659.

  • @@ -85956,6 +85949,9 @@ dictionary DragEventInit : MouseEventInit {