Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(630)

Unified Diff: LayoutTests/fast/html/imports/resources/custom-element-style.html

Issue 202813002: [HTML Import] Let script block by pending resources created by lifecycle callback (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Landing Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/html/imports/resources/custom-element-style.html
diff --git a/LayoutTests/fast/html/imports/resources/custom-element-style.html b/LayoutTests/fast/html/imports/resources/custom-element-style.html
new file mode 100644
index 0000000000000000000000000000000000000000..c4a067f620e5a15113f2fb2789daca0263ce9efe
--- /dev/null
+++ b/LayoutTests/fast/html/imports/resources/custom-element-style.html
@@ -0,0 +1,16 @@
+<!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));
+};
+document.registerElement('x-test', {prototype: proto});
+</script>

Powered by Google App Engine
This is Rietveld 408576698