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

Display Ordering: will this cause open="" attributes to get removed during HTML parsing? #5

Closed
domenic opened this issue Feb 23, 2022 · 2 comments

Comments

@domenic
Copy link

domenic commented Feb 23, 2022

https://github.com/mfreed7/popup#display-ordering

It is possible for an HTML document to contain multiple elements with popup=popup. In this case, only the last such element on the page will remain open when the page is fully loaded. This is because each successive popup element will force the previous one closed via the “one at a time” behavior.

The implication of this, combined with https://github.com/mfreed7/popup#dismiss-behavior, is that at the end of parsing only a single open="" attribute will be present, and others will be removed.

If this is the case, it'd be good to call it out explicitly. Also, there is some worry about modifications to the DOM during parsing, and the associated events; see whatwg/html#4500 /cc @annevk @emilio. But probably it's no worse than custom elements, so I think that's not a real issue, just something we need to step lightly around...

@annevk
Copy link

annevk commented Feb 25, 2022

Note that custom elements don't end up executing script in all documents they end up in, e.g., with XMLHttpRequest or DOMParser. The problem with <details open> is that it does, iirc.

@mfreed7
Copy link
Owner

mfreed7 commented Mar 16, 2022

I've moved this issue to here: openui/open-ui#494

@mfreed7 mfreed7 closed this as completed Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants