Re: [w3ctag/design-reviews] Behavior of the "disabled" attribute for HTMLLinkElement (#519)

> How does the integration with CSSOM's disabled attribute work?

They're completely independent. `HTMLLinkElement.disabled` just reflects the `disabled` attribute on the `link`. This is, I'd note, different from `HTMLStyleElement.disabled` and `SVGStyleElement.disabled`, which just forward to their inner stylesheet.

Firefox used to make `HTMLLinkElement.disabled` (the WebIDL attribute) behave just like `HTMLStyleElement.disabled` and `SVGStyleElement.disabled`, but we had to change it for compat reasons because people were using the link attribute, and here we are now.

Note that I intentionally proposed to make them two completely separate mechanisms, because figuring out a sane interaction between the CSSOM disabled flag and the link element felt really weird (setting `link.sheet.disabled = true` should ideally then also reflect on the link's attribute?). That also didn't match any engine.

So I went with a compromise described in the comment above.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/519#issuecomment-645739042

Received on Thursday, 18 June 2020 02:54:20 UTC