v132 · Iframe Document Tester

Iframe Document Tester

Chrome 132 changes showPopover() and showModal() to throw a NotSupportedError when the element's node document is not the active document. Previously these calls failed silently. Run each scenario below to see the before/after behaviour and catch the exception.

Active document (main frame)
Calling showPopover() on an element in the active document. Should work normally.
Detached element
Create an element, do NOT attach it to the document, then call showPopover(). Chrome 132 throws.
Adopted element
Create an element in a different (inactive) document via document.implementation.createHTMLDocument(), call showPopover(). Chrome 132 throws.
Dialog showModal()
Same test for <dialog>. Calling showModal() on a dialog in an inactive document throws NotSupportedError.
try/catch error handling
The recommended pattern: wrap calls in try/catch and check for NotSupportedError.
Active document dialog
Control: showModal() on a <dialog> that IS in the active document. Should open.
Test results
Click a test above to run it.

Behaviour matrix

ScenarioBefore Chrome 132Chrome 132+
showPopover() in active documentworksworks
showPopover() in detached elementsilent failNotSupportedError thrown
showPopover() in inactive documentsilent failNotSupportedError thrown
showModal() in active documentworksworks
showModal() in inactive documentsilent failNotSupportedError thrown
hidePopover() in inactive documentsilent failNotSupportedError thrown

This dialog opened successfully from the active document.

Popover visible in active document ✓

see also