From 70f2b06d67505b2fc7f5331e9768b209ad368dd2 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 611d83976cc..1a2cf5d54ec 100644 --- a/source +++ b/source @@ -61772,6 +61772,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.

  • @@ -61801,9 +61804,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 @@ -85549,10 +85547,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.

  • @@ -86108,6 +86101,9 @@ dictionary DragEventInit : MouseEventInit {