mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-05 04:27:09 +00:00
fix(spec): a boolean state selector names what the live element reports
clickable, enabled, focused, checked and selected are derived from the element rather than written by the markup, so matching them as raw attributes built [clickable="true"] and reached nothing: the keys are accepted, no unknown-key error fires, and the worked example in docs/manual/spec-language.md found no element on web and passed having checked nothing. Each key is answered by the same function elementHandle derives the fact with, since no CSS says what any of them says: :focus names the shadow host of a focused field as well, :checked misses a checked custom element and answers for a selected option besides, and [checked] is the state the page loaded with rather than the one the user left it in.
This commit is contained in:
1 parent
4bcd82a8a6
commit
f7135b81d8
3 files changed
+212
-47
No files matched your search
@@ -50,6 +50,11 @@ export interface FakeElementSpec {
|
||||
clickable?: boolean;
|
||||
editable?: boolean;
|
||||
disabled?: boolean;
|
||||
// checked/selected are DOM properties rather than markup attributes on a real
|
||||
// element, which is the whole point of them: the attribute records what the
|
||||
// page started with and stops tracking the first time a user acts.
|
||||
checked?: boolean;
|
||||
selected?: boolean;
|
||||
// overflows makes the element's content taller than its box, which is how the
|
||||
// host decides an element is scrollable.
|
||||
overflows?: boolean;
|
||||
|
||||
Reference in new issue
Block a user