When using the code below in a collection, I get a bunch of errors and the panels are not usable anymore.
try {
customElements.define("a-xyz", class XYZ extends HTMLElement {});
} catch (err) {
console.error(err);
}
class Plugin extends CollectionPlugin {
onLoad() {
this.views.register("table", (viewContext) => {
const $element = viewContext.getElement();
$element.innerHTML = /* html */ `<a-xyz style="height: calc(100vh - 290px);width: 100%;"></a-xyz>`;
})
}
}
Results in:
app-63FFH6CQ.js:230 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'onLoad')
and many more following...