blob: 00c41457cddc63026443f52df0af255e82310e62 [file] [log] [blame]
<!DOCTYPE html>
<template>
<style>
@import url(hello.css);
</style>
<h1>Hello</h1>
</template>
<script>
var t = document.currentScript.ownerDocument.querySelector('template');
var proto = Object.create(HTMLElement.prototype);
proto.createdCallback = function() {
var root = this.createShadowRoot();
root.appendChild(document.importNode(t.content, true));
};
document.registerElement('x-test', {prototype: proto});
</script>