-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Clarify IDL reflection for closedby
attribute
#10945
Comments
Good catch! I think (2) is slightly preferable, but I don't feel strongly. |
Note the "Note", which attempted to define the behavior:
I think (2) basically means converting that from a Note to an actual algorithm, right? If so, and if there's a pointer somewhere for how to word that, I'm happy to give it a try! |
My preference would be (1) personally. It feels odd that round tripping the IDL property with its own value can change the behaviour of the element? e.g. I have a bare dialog, I call show(), I round trip the IDL property, I call .close() and then I call .showModal() suddenly close watchers don't work? Whereas with popover invalid values reflect as manual, round tripping that has no effect? |
This is already the case for some other reflection-ish properties, like |
So there are two scenarios that conflict here:
I guess I don't know what the use case is for #1. I can see the point of #2 - it allows code to "ask" what behavior they're getting. |
What is the issue with the HTML Standard?
Preamble
In #10737 we added the
closedby
attribute. This is an enumerated attribute limited to known values, where the missing/invalid state is theauto
state. Theauto
state does not have a keyword.The spec states:
Root issue
Limited to known values declares that if a state like
auto
has no corresponding keyword, then the empty string must be returned. However Chrome and the WPTs expect something different (all of these were tested on Chrome canary)."none"
"none"
"closerequest"
This matches the values represented in the algorithm
computed closed-by-state
but theclosedby
reflection rules don't mention this.Next steps
I think the following paths forward exist for us:
""
(the empty string) whenclosedby
is in the auto state.closedby
attribute does not do simple reflection, and instead reflects the computed state.Of course I could be missing something, in which case this issue could be closed.
/cc @mfreed7 @domenic
The text was updated successfully, but these errors were encountered: