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
| Scenario | Before Chrome 132 | Chrome 132+ |
|---|---|---|
| showPopover() in active document | works | works |
| showPopover() in detached element | silent fail | NotSupportedError thrown |
| showPopover() in inactive document | silent fail | NotSupportedError thrown |
| showModal() in active document | works | works |
| showModal() in inactive document | silent fail | NotSupportedError thrown |
| hidePopover() in inactive document | silent fail | NotSupportedError thrown |
Popover visible in active document ✓