OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/testharness.js"></script> | |
3 <script src="../../resources/testharnessreport.js"></script> | |
4 <link rel="import" href="resources/async-component.html" async> | |
5 <async-component></async-component> | |
6 <script> | |
7 'use strict'; | |
8 | |
9 promise_test(() => { | |
10 return customElements.whenDefined('async-component').then(() => { | |
11 let el = document.querySelector('async-component'); | |
12 assert_true(el instanceof AsyncComponent, 'async-component should be custom' ); | |
dominicc (has gone to gerrit)
2016/08/19 04:54:10
"be custom" is a bit vague; can you be more specif
kochi
2016/08/19 10:51:47
I rewrote where appropriate, but "be custom" is ok
| |
13 | |
14 let link = document.querySelector('link[rel=import]'); | |
15 let elInImport = link.import.querySelector('async-component'); | |
16 assert_true(elInImport instanceof AsyncComponent, 'async-component in import should be custom'); | |
17 }); | |
18 }, 'Custom Elements v1 definition in async import should work.'); | |
dominicc (has gone to gerrit)
2016/08/19 04:54:10
Just refer to these as "custom elements"; not "v1.
kochi
2016/08/19 10:51:47
Done.
| |
19 </script> | |
OLD | NEW |