blob: 69a643da8fe17ea42e07d48694ca40d6b517cc20 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<div id="container"></div>
<script>
description('Tests that custom element constructors run the createdCallback synchronously.');
var proto = Object.create(HTMLElement.prototype);
var ncallbacks = 0;
proto.createdCallback = function () {
ncallbacks++;
};
var A = document.registerElement('x-a', {prototype: proto});
var x = new A();
shouldBe('ncallbacks', '1');
successfullyParsed = true;
</script>