Skip to content

Commit

Permalink
Mar 23, 2023, 4:46 PM
Browse files Browse the repository at this point in the history
  • Loading branch information
nuxodin committed Mar 23, 2023
1 parent 56a7a2d commit 1ee3b80
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions htmlfills.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function qsa(el, selector) {
}
}
function onElement(selector, callback) {
var listener = {
const listener = {
selector: selector,
callback: callback,
elements: new WeakMap(),
Expand Down Expand Up @@ -59,7 +59,7 @@ function checkMutations(mutations) {
while (target = nodes[i++]) target.nodeType === 1 && checkListeners(target);
}
}
var loaded = false;
let loaded = false;
document.addEventListener('DOMContentLoaded', function () {
loaded = true;
});
Expand All @@ -82,7 +82,7 @@ const polyfills = {
},
"[inert]": {
supports: Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'inert')?.enumerable === true, // hacky test, mod.js adds inert property support
js: 'https://cdn.jsdelivr.net/npm/wicg-inert/dist/inert.min.js',
js: 'https://cdn.jsdelivr.net/npm/wicg-inert@3.1.2/dist/inert.min.js',
},
}

Expand Down
13 changes: 9 additions & 4 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,19 @@

<div inert>
<h2>inert</h2>
text selectable?
<input value="focusable?">
<label>
text selectable?
<input value="focusable?">
</label>
</div>

<div focusgroup>
<h2>focusgroup</h2>
<input type="checkbox">
<input type="checkbox">
<label>
arrow navigatable?
<input type="checkbox">
<input type="checkbox">
</label>
</div>

<button onclick="navigator.share({title:'title',text:'text',url:location.href})">share</button>

0 comments on commit 1ee3b80

Please sign in to comment.