Created
March 1, 2022 20:05
-
-
Save nolanlawson/3417c1534640355b382e2ab0cf6b6ee7 to your computer and use it in GitHub Desktop.
Repro shared constructed stylesheets issue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CSSStyleSheet repro</title> | |
</head> | |
<body> | |
<h1>CSSStyleSheet repro</h1> | |
<script type="module"> | |
const template = document.createElement('template'); | |
const div = document.createElement('div') | |
div.attachShadow({ mode: 'open' }) | |
template.content.appendChild(div); | |
const sheet = new CSSStyleSheet() | |
div.shadowRoot.adoptedStyleSheets = [sheet] | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment