Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is possible to create CloseWatchers for dialog elements and popovers which aren't in fully active document #10634

Open
smaug---- opened this issue Sep 19, 2024 · 1 comment
Labels

Comments

@smaug----
Copy link

What is the issue with the HTML Standard?

One can't create CloseWatchers for non-fully-active document through the constructor
https://html.spec.whatwg.org/#dom-closewatcher, but can using dialog element or popovers
https://html.spec.whatwg.org/#dom-dialog-showmodal step 9
https://html.spec.whatwg.org/#the-popover-attribute:establish-a-close-watcher 11.8

@domenic @keithamus

@domenic
Copy link
Member

domenic commented Sep 19, 2024

Note: there are ~2 types of non-fully-active documents. The first is a document in bfcache. The second is one without a browsing context, e.g. created by new Document(). This issue is about the latter, because you can't run JS in the former.

I wonder if it'd be web-compatible to throw for showModal() in non-fully active documents. It's pretty nonsensical anyway.

But, the simplest path is to probably just no-op the close watcher step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants