t.createElement("div"), "hidden", notElement); });
    assert_throws_js(other.TypeError, () => { new Proxy(other.text, {}).nodeType; });
}, "Cross-realm getter throws when called on incompatible object");

promise_test(async t => {
    const other = await createRealm(t);
    const notElement = Object.create(other.HTMLElement.prototype);
    const notText = Object.create(other.Text.prototype);

    assert_throws_js(other.TypeError, () => { Object.create(other.element).innerHTML = ""; });
    assert_throws_js