4e7b29e417
before `converse.initialize` has been called In the process, remove other "core" promises. There is no core or community plugins code awaiting on them and since it's possible to call `converse.initialize` twice, I'm not sure it makes sense to even have them. Also removed unused error class IllegalMessage.
20 lines
515 B
JavaScript
20 lines
515 B
JavaScript
import { api, converse } from "@converse/headless/converse-core";
|
|
|
|
|
|
/**
|
|
* `converse-root` is an optional custom element which can be used to
|
|
* declaratively insert the Converse UI into the DOM.
|
|
*
|
|
* It can be inserted into the DOM before or after Converse has loaded or been
|
|
* initialized.
|
|
*/
|
|
class ConverseRoot extends HTMLElement {
|
|
|
|
async connectedCallback () {
|
|
await api.waitUntil('initialized');
|
|
converse.insertInto(this);
|
|
}
|
|
}
|
|
|
|
customElements.define('converse-root', ConverseRoot);
|