-
Notifications
You must be signed in to change notification settings - Fork 1k
[reactive-element] Assume native constructible stylesheet support #5120
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
base: main
Are you sure you want to change the base?
Conversation
|
📊 Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultsthis-change
render
update
update-reflect
this-change, tip-of-tree, previous-release
render
update
nop-update
this-change, tip-of-tree, previous-release
render
update
this-change, tip-of-tree, previous-release
render
update
update-reflect
|
|
The size of lit-html.js and lit-core.min.js are as expected. |
|
|
||
| // This is a getter so that it's lazy. In practice, this means stylesheets | ||
| // are not created until the first element instance is made. | ||
| get styleSheet(): CSSStyleSheet | undefined { |
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.
This can just be CSSStyleSheet, we can drop the | undefined here.
DO NOT MERGE
Exploration of how much code we could remove if we assumed constructible stylesheet support, which is Baseline and available cross-browser since March 2023: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/CSSStyleSheet
This change saves 650 bytes.