| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <link rel="import" href="../resources/chai.html" /> | |
| 3 <link rel="import" href="../resources/mocha.html" /> | |
| 4 <body> | |
| 5 <div id="container"></div> | |
| 6 <script> | |
| 7 describe('Custom element constructors', function() { | |
| 8 it('should run the createdCallback synchronously', function() { | |
| 9 var proto = Object.create(HTMLElement.prototype); | |
| 10 var ncallbacks = 0; | |
| 11 proto.createdCallback = function () { | |
| 12 ncallbacks++; | |
| 13 }; | |
| 14 var A = document.registerElement('x-a', {prototype: proto}); | |
| 15 var x = new A(); | |
| 16 assert.equal(ncallbacks, 1); | |
| 17 }); | |
| 18 }); | |
| 19 </script> | |
| 20 </body> | |
| 21 </html> | |
| OLD | NEW |