Bug 1416999 - Remove document.registerElement

Tag #1375
This commit is contained in:
Matt A. Tobin 2020-04-17 07:07:09 -04:00 committed by Roy Tam
commit cedff6e214
28 changed files with 82 additions and 879 deletions

View file

@ -15,15 +15,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1094930
<p id="display"></p>
<script type="application/javascript">
SimpleTest.waitForExplicitFinish();
var proto = {
connectedCallback: function() {
class XFoo extends frames[0].HTMLElement {
connectedCallback() {
ok(true, "connectedCallback was called");
SimpleTest.finish()
SimpleTest.finish();
}
};
var f = document.registerElement.call(frames[0].document, "x-foo", { prototype: proto });
frames[0].document.firstChild.appendChild(new f());
customElements.define.call(frames[0].customElements, "x-foo", XFoo);
frames[0].document.firstChild.appendChild(new XFoo());
</script>
</body>
</html>