Update src/runtime/internal/dom.ts

pull/7800/head
Simon H 3 years ago committed by GitHub
parent da5ddd40b4
commit e106eb55b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -161,7 +161,7 @@ export function append_empty_stylesheet(node: Node) {
// Using the hash for the empty string (for an empty tag) works in all browsers except Safari.
// So as a workaround for the workaround, when we append empty style tags we set their content to /* empty */.
// The hash 'sha256-9OlNO0DNEeaVzHL4RZwCLsBHA8WBQ8toBp/4F5XV2nc=' will then work even in Safari.
style_element.textContent = style_element.textContent || '/* empty */';
style_element.textContent = '/* empty */';
append_stylesheet(get_root_for_style(node), style_element);
return style_element.sheet as CSSStyleSheet;
}

Loading…
Cancel
Save