Comments (5)
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.
from html.
from html.
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:
The following attribute change steps, given element, localName, oldValue, value, and namespace, are used for all details elements:
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.
Probably most of the time this is fine since I would guess(??) the steps are often mutually-non-observable
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...?
from html.
I would love it if someone did a holistic refactor of the attribute change steps (and insertion steps, and connected steps, etc...). #7712 and #2771 kind of discuss that.
I don't think it's the highest-priority work, but it would be nice. It's just a lot of busywork moving stuff around.
from html.
Moving to #10331.
from html.
Related Issues (20)
- template.content has unusable value HOT 1
- Clean up HTML <-> DOM hooks HOT 2
- Consider improving interoperability of <iframe> throttling margins. HOT 10
- The dropEffect column in the Drag and Drop events summary table should clarify it represents default values.
- Drag and drop spec allows multiple values for dropEffect which might cause browsers to behave differently.
- How should UAs handle web authors setting dropEffect values?
- Proposal for event ordering when inserting replacement text such as text prediction, spell checker, etc
- It's unclear how shadows should be drawn across various compositing operators HOT 2
- Should custom validity error message treat \r as newline? HOT 3
- Upcoming WHATNOT meeting on 5/16/2024 HOT 5
- Date Picker popup doesn't propagate shadow DOM events into the light DOM HOT 1
- Clarify `detail` value of synthetic click event HOT 3
- Consider making "gamepadconnected" part of “activation triggering user event”? HOT 1
- Meeting 2 for joint OpenUI-WHATWG/HTML-CSSWG task force on styleable form controls HOT 1
- Upcoming WHATNOT meeting on 5/23/2024 HOT 5
- [Proposal]: Enable `HTMLElement` attributes to be toggled without JavaScript HOT 1
- Issue with Step 10 of inner navigate event firing algorithm HOT 1
- Provide native validation messages for native validity states on Form Associated Custom Elements
- Mascoticas
- Tienda de mascotas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html.