-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add create[Empty]CSSStyleSheet and bring back moreStyleSheets #33
Conversation
Oh, and this might be a good time to rename |
If |
index.bs
Outdated
@@ -28,10 +30,17 @@ dictionary CSSStyleSheetInit { | |||
boolean alternate = false; | |||
boolean disabled = false; | |||
}; | |||
|
|||
partial interface DocumentOrShadowRoot { | |||
attribute StyleSheetList moreStyleSheets; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to bikeshed this name, it's so bad. ^_^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, any suggestions? adoptedStyleSheets
from @calebdwilliams sounds good, I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds fine to me.
Discussions led to changing the constructor to a factory method and splitting into two functions, one returning a Promise to not block with text parsing, and another to return a CSSStyleSheet that is empty/doesn't have any text. The methods are located in Document so that association of the constructed stylesheet with the Document is clear, and thus we can have clear URL (#10, #15) of the stylesheet and enforce usage in only one Document (#23).
We're also bringing back moreStyleSheets due to interest in WICG/webcomponents#759
Resolves #2, #13.
Preview | Diff