UNPKG

@yuebai008/cli

Version:

Command line interface for rapid qg-minigame development

1 lines 437 B
export class WrappableComponent extends HTMLElement{wrapper=null;async render(){}wasShown(){}willHide(){}}export function legacyWrapper(n,e){return new class extends n{#n;constructor(...n){super(!0),this.#n=e,this.#n.wrapper=this,this.#n.render(),this.contentElement.appendChild(this.#n)}wasShown(){this.#n.wasShown(),this.#n.render()}willHide(){this.#n.willHide()}async doUpdate(){await this.#n.render()}getComponent(){return this.#n}}}