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

Shall we include added stylesheets in document.styleSheets? #4

Closed
TakayoshiKochi opened this issue Feb 5, 2018 · 2 comments
Closed

Comments

@TakayoshiKochi
Copy link
Member

(instead of #3,)
Do we want to include manually-added sheets in document.styleSheets, similar to how document.fonts mixes OM-created and manually-created fonts?

Big difference is that ordering matters here, which makes dealing with the invariants much more annoying. (What happens if you manually add a sheet between two <link> sheets, then insert another <link> in the document between them? Does it go before or after your manually-added one? Or do we just make it illegal to manually add a sheet before an automatic sheet?)

TakayoshiKochi added a commit to TakayoshiKochi/construct-stylesheets that referenced this issue Feb 6, 2018
All 5 inline issues are migrated to GitHub.

WICG#2
Shall we allow asynchronous style sheet parsing?

WICG#3
moreStyleSheets needs better name

WICG#4
Shall we include added stylesheets in `document.styleSheets`?

WICG#5
StyleSheetList will need to define a constructor, accepting a `sequence<StyleSheet>`.

WICG#18
Define how origin is determined for a constructed stylesheet
@TakayoshiKochi
Copy link
Member Author

I agree putting constructed stylesheets to existing document.styleSheets is a bad idea, as stated in the OP. StyleSheetList is already a live list, whose order can change via DOM mutations, and clearly defining the order relationship with non-constructed stylesheets makes the spec/implementation unnecessarily complex.

I'd prefer the separate list (.moreStyleSheets) approach.

@TakayoshiKochi
Copy link
Member Author

As #3 concludes no .moreStyleSheets for now, let's close this.

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

No branches or pull requests

1 participant