Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement <link disabled> #26739

Open
CYBAI opened this issue Jun 1, 2020 · 2 comments
Open

Implement <link disabled> #26739

CYBAI opened this issue Jun 1, 2020 · 2 comments

Comments

@CYBAI
Copy link
Member

CYBAI commented Jun 1, 2020

Spec: whatwg/html#4519
WPT: web-platform-tests/wpt#22645

@ghostd
Copy link
Contributor

ghostd commented Oct 6, 2020

Hi

@jdm @CYBAI i started working on this. I added the code to handle the new "explicit enabled" property. But i dont understand what should i do to modofy the stylesheet list. As you can see into the tests, the document.styleSheets and the stylesheet owner node change according to the mutation of the "disabled" attribute.

assert_equals(document.styleSheets.length, 1);
let sheet = document.styleSheets[0];
assert_equals(sheet.ownerNode, link);
assert_applies(true);
link.disabled = true;
assert_equals(sheet.ownerNode, null);
assert_false(sheet.disabled);
assert_applies(false);
assert_true(link.hasAttribute("disabled"));
assert_equals(document.styleSheets.length, 0);

Any ideas?

@CYBAI
Copy link
Member Author

CYBAI commented Oct 7, 2020

@ghostd For ownerNode, there's an open issue at #23082 which had an almost done PR.

I guess the related spec of styleSheet removal and setting ownerNode to null is in remove a CSS style sheet in CSS spec.

However, I'm not clear is how setting the explicit enabled will trigger the stylesheet removal in the spec update for this issue.

@emilio could you help to point out the related spec here 👀?

@ghostd so, maybe it's good for you to work on that ownerNode issue and then get back to this one so that ownerNode property can work fine with that one done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants