<!DOCTYPE html> | |
<x-b id="b1"></x-b> | |
<script> | |
(function() { | |
var proto = Object.create(HTMLElement.prototype); | |
proto.createdCallback = function () { | |
window.upgradeIds.push(this.id); | |
}; | |
var ctor = document.registerElement('x-b', {prototype: proto}); | |
})(); | |
test(function () { | |
assert_array_equals(window.upgradeIds, ['a1', 'a2', 'a3', 'b0', 'b1'], 'Elements should got upgrade from the import.'); | |
}, 'upgrade in an import (in nested import)'); | |
</script> | |
<x-b id="b2"></x-b> |