OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
5 <meta name="dart.unittest" content="full-stack-traces"> | |
6 <title> created_watcher_test.html </title> | |
7 <style> | |
8 .unittest-table { font-family:monospace; border:1px; } | |
9 .unittest-pass { background: #6b3;} | |
10 .unittest-fail { background: #d55;} | |
11 .unittest-error { background: #a11;} | |
12 </style> | |
13 <script src="/packages/web_components/platform.js"></script> | |
14 <script src="/packages/web_components/dart_support.js"></script> | |
15 <script src="/packages/web_components/created_watcher.js"></script> | |
16 </head> | |
17 <body> | |
18 <h1> Running created_watcher_test </h1> | |
19 <script> | |
20 var counter = 0; | |
21 var A = function() {}; | |
22 A.prototype = Object.create(HTMLElement.prototype); | |
Siggi Cherem (dart-lang)
2014/06/06 22:31:47
FYI, I also tried to write this using other patter
justinfagnani
2014/06/06 23:33:05
Ouch... we should try. I wouldn't at all be surpri
Siggi Cherem (dart-lang)
2014/06/09 17:10:28
Now that we are replacing things in place it's eas
| |
23 A.prototype.createdCallback = function() { | |
24 this.x = counter++; | |
25 }; | |
26 var B = function() {}; | |
27 B.prototype = Object.create(HTMLDivElement.prototype); | |
28 B.prototype.createdCallback = function() { | |
29 this.x = counter++; | |
30 }; | |
31 B.extends = 'div'; | |
32 | |
33 document.registerElement('x-a', A); | |
34 document.registerElement('x-b', B); | |
35 | |
36 function registerC() { | |
37 var C = function() {}; | |
38 C.prototype = Object.create(HTMLElement.prototype); | |
39 C.prototype.createdCallback = function() { | |
40 this.x = counter++; | |
41 }; | |
42 document.registerElement('x-c', C); | |
43 } | |
44 function addA() { | |
45 document.body.appendChild(document.createElement('x-a')); | |
46 } | |
47 function addB() { | |
48 document.body.appendChild(document.createElement('div', 'x-b')); | |
49 } | |
50 function addC() { | |
51 document.body.appendChild(document.createElement('x-c')); | |
52 } | |
53 </script> | |
54 <x-a id="i1"></x-a> | |
55 <div is="x-b" id="i2"></div> | |
56 <x-c id="i3"></x-b> | |
57 <script type="text/javascript" | |
58 src="/root_dart/tools/testing/dart/test_controller.js"></script> | |
59 %TEST_SCRIPTS% | |
60 </body> | |
61 </html> | |
OLD | NEW |