mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
fix(chrome): emit every markup attribute and read checked and selected off the property
the dump emitted a fixed standard attribute set, so a spec reading data-cents or data-account-id saw undefined on the goja host and nothing at all in the trace. it now keys every attribute by the name the markup writes, derived keys overwriting. checked and selected come from the dom property rather than whatever a component left on the object, which is also what the page-side element handle now reports, so a ticked box reads as ticked instead of reporting its starting state forever.
This commit is contained in:
1 parent
de654334b0
commit
05c8523762
8 files changed
+605
-2
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<!doctype html>
|
||||
<html id="page">
|
||||
<head id="page-head">
|
||||
<meta id="page-charset" charset="utf-8" />
|
||||
<title id="page-title">custom element flags</title>
|
||||
</head>
|
||||
<body id="page-body">
|
||||
<div id="tabs">
|
||||
<a id="tab-all" href="#/">All</a>
|
||||
<a id="tab-active" href="#/active">Active</a>
|
||||
</div>
|
||||
<div id="picker"></div>
|
||||
<input id="toggle" type="checkbox" checked />
|
||||
<script id="page-script">
|
||||
// What a component keeps in these properties is whatever the component
|
||||
// means by them: a selector element names the selected item here rather
|
||||
// than saying whether it is itself selected.
|
||||
document.getElementById('tabs').selected = 'active';
|
||||
document.getElementById('picker').checked = 'partial';
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,27 @@
|
||||
<!doctype html>
|
||||
<html id="page">
|
||||
<head id="page-head">
|
||||
<meta id="page-charset" charset="utf-8" />
|
||||
<title id="page-title">element state</title>
|
||||
</head>
|
||||
<body id="page-body">
|
||||
<!-- toggle-all starts unchecked in the markup and toggle-done starts
|
||||
checked, so a reader of the `checked` ATTRIBUTE reports each one's
|
||||
starting value forever and disagrees with both after one click. -->
|
||||
<input id="toggle-all" type="checkbox" />
|
||||
<input id="toggle-done" type="checkbox" checked />
|
||||
<input id="editing" type="text" value="buy milk" />
|
||||
<button id="save">save</button>
|
||||
<button id="cancel" disabled>cancel</button>
|
||||
<select id="filter">
|
||||
<option id="filter-all">all</option>
|
||||
<option id="filter-active" selected>active</option>
|
||||
</select>
|
||||
<script id="page-script">
|
||||
window.__keys__ = [];
|
||||
document.addEventListener('keydown', function (event) {
|
||||
window.__keys__.push(event.key);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user