[Webkit-unassigned] [Bug 280807] :scope :state not work
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 11 06:35:31 PDT 2024
https://bugs.webkit.org/show_bug.cgi?id=280807
--- Comment #4 from Karl Dubost <karlcow at apple.com> ---
<button id=btn>toggle content visible</button>
<my-element>
</my-element>
with
@scope (my-element) {
:scope:not(:state(open)) {
display: none;
}
}
and
customElements.define('my-element', class extends HTMLElement {
constructor() {
super();
this.internals = this.attachInternals();
this.innerHTML = 'content';
btn.onclick = () => {
if (this.internals.states.has('open')) {
this.internals.states.delete('open')
} else {
this.internals.states.add('open')
}
}
}
})
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20241011/5a2a5b80/attachment-0001.htm>
More information about the webkit-unassigned
mailing list