blob: fdba241ded68d485d9bdac9254c996150d385f3c [file] [log] [blame]
<!--
Copyright 2020 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<div id="host"></div>
<template id="tmpl">
<style> .red { color: red; } </style>
<div id="inner" class="red">hi!</div>
</template>
<script>
const template = document.querySelector('#tmpl');
const root = document.querySelector('#host').attachShadow({mode: 'open'});
root.appendChild(template.content.cloneNode(true));
</script>