@gluonjs/devtools / packages/devtools/src / RegisterApplicationOptions
Interface: RegisterApplicationOptions
Properties
app
readonlyapp:Pick<GluonApp,"mounted">
context?
readonlyoptionalcontext?: () =>unknown
Returns
unknown
id
readonlyid:string
name?
readonlyoptionalname?:string
root
readonlyroot:Element
router?
readonlyoptionalrouter?:InspectableRouter
state?
readonlyoptionalstate?: () =>unknown
Returns
unknown
store?
readonlyoptionalstore?:InspectableStore
Example
Describe the application identity, mount state, and root element that the Devtools bridge should inspect:
import { createApp, html } from '@gluonjs/core';
import {
createDevtoolsBridge,
mountGluonDevtools,
type RegisterApplicationOptions,
} from '@gluonjs/devtools';
const root = document.querySelector<HTMLElement>('#app')!;
const app = createApp(() => html`<main>Shop</main>`);
app.mount(root);
const bridge = createDevtoolsBridge({ enabled: true });
const registration = { id: 'shop', name: 'Shop', app, root } satisfies RegisterApplicationOptions;
const unregister = bridge.registerApplication(registration);
const panel = mountGluonDevtools(bridge);
panel.unmount();
unregister();
bridge.dispose();
app.unmount();