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

Side by Side Diff: third_party/WebKit/LayoutTests/custom-elements/imports/resources/parser-customize.html

Issue 2242743002: Make custom elements work in HTML imports (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase wip Created 4 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 <parser-customize></parser-customize>
2 <script>
3 test(() => {
4 assert_equals(constructors.length, 0);
5
6 class ParserCustomize extends HTMLElement {
7 constructor() {
8 super();
9 constructors.push(document.currentScript.ownerDocument.title || 'Unknown') ;
10 }
11 }
12 customElements.define('parser-customize', ParserCustomize);
13
14 assert_equals(constructors.length, 1);
15 }, 'Custom Element definition should upgrade parsed elements in import.');
16 </script>
17
18 <parser-customize></parser-customize>
19
20 <script>
21 test(() => {
22 assert_equals(constructors.length, 2);
23 }, 'Custom Element definition should make parser customize elements.');
24 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698