Documentation
    Preparing search index...

    Interface NotifyServiceOptions

    Optional configuration for createNotifyService.

    const notify = createNotifyService({
    generateId: () => crypto.randomUUID(),
    defaultGrant: false,
    onSend: (windowId, msg) => console.log(`napplet ${windowId} sent ${msg.title}`),
    });
    runtime.registerService('notify', notify);
    interface NotifyServiceOptions {
        defaultGrant?: boolean;
        generateId?: () => string;
        onSend?: (windowId: string, payload: NotifySendMessage) => void;
    }
    Index

    Properties

    defaultGrant?: boolean

    Default permission grant for notify.permission.request. Host apps that want real permission prompts should replace this service with a real backend via runtime.registerService. Default: true.

    generateId?: () => string

    Generate a shell-assigned notification ID for notify.send.result. Default: a monotonically increasing shell-<n> counter.

    onSend?: (windowId: string, payload: NotifySendMessage) => void

    Called synchronously when a napplet dispatches notify.send. Intended for host-app plumbing (UI toast, logging, etc.) without requiring a full backend replacement.