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
Why does the handle attribute changes algorithm of popover associate with all HTML elements #10259
Comments
In general, the various hooks that DOM provides (largely for HTML's consumption by my estimation) like attribute change steps, insertion steps etc., seem to be underspecified ordering-wise. DOM provides a per-specification hook, which doesn't specify ordering across specs, and also HTML seems to provide multiple overrides for some of these hooks, as you've found, which is bad form. Probably most of the time this is fine since I would guess(??) the steps are often mutually-non-observable, but I imagine this system has grown into a larger mess than it was originally conceived to be, so an issue filed against DOM to track cleaning that up is probably best (unless Anne has more historical context that I don't know about). For this specific instance about popover, I would delegate to @josepharhar who has more domain-specific context than I. But also happy to take a look myself if needed. |
I probably wrote the popover change steps this way because I found the details element change steps before I found the nonce change steps to figure out what to write:
I don't see how the hook which DOM provides has anything to do with particular types of elements or attributes, so maybe it would be most correct to change all of the attribute change steps to stop saying that they apply to certain types of elements or attributes, and add steps like the one in the popover change steps which actually examines the element and returns early when the steps don't apply.
Yeah I don't think this is a problem, but if somebody finds a problem then I guess we will have to write in the spec somewhere what the order of attribute change step hooking algorithms is...? |
Moving to #10331. |
You have the following:
But how the above can work with for example this:
I mean the first thing determinated for all HTML elements and the second only for content attribute nonce. But if some invokes the attribute change steps what will it mean:
By the way, why the popover's attribute change steps doesn't apply same way as for the nonce content attribute algorithm?
Why this can't be deleted
with modification to:
Would be better if spec become clearer, because some expanding in spec makes the mess sometimes.
The text was updated successfully, but these errors were encountered: