Skip to content

Commit 59062d6

Browse files
committed
Bail out early when constructible stylesheets aren't supported
1 parent 57ef19f commit 59062d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sparkly-text.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ class SparklyText extends HTMLElement {
6666
}
6767

6868
connectedCallback() {
69-
if (this.shadowRoot) {
69+
// https://caniuse.com/mdn-api_cssstylesheet_replacesync
70+
if (this.shadowRoot || !("replaceSync" in CSSStyleSheet.prototype)) {
7071
return;
7172
}
7273

0 commit comments

Comments
 (0)