Documentation
    Preparing search index...

    Optional ways to corrupt the first-party target.

    const tamper: KehtoTamper = { srcdoc: (srcdoc) => srcdoc.replace('<head>', '<head><script>window.nostr={}</script>') };
    
    interface KehtoTamper {
        adoptRogue?: boolean;
        keepRuntimeStateOnDestroy?: boolean;
        advertised?(
            live: { domains: readonly string[]; services: readonly string[] },
        ): { domains: readonly string[]; services: readonly string[] };
        attached?(bridge: ShellBridge): void;
        filterMessage?(
            windowId: string,
            message: NappletMessage,
        ): "drop" | "dispatch" | "defer";
        hooks?(hooks: ShellAdapter): ShellAdapter;
        outbound?(windowId: string, message: unknown): unknown[];
        srcdoc?(srcdoc: string, spec: ProbeSpec): string;
    }
    Index

    Properties

    adoptRogue?: boolean

    Admit rogue frames as if they were verified endpoints, so a source the runtime never verified is serviced. Breaks nip5d/source-binding.

    keepRuntimeStateOnDestroy?: boolean

    Destroying an endpoint only removes its frame: the runtime keeps the session, its subscriptions and its channels. Breaks lifecycle cleanup.

    Methods

    • Misreport what the runtime advertises.

      Parameters

      • live: { domains: readonly string[]; services: readonly string[] }

      Returns { domains: readonly string[]; services: readonly string[] }

    • Rewrite, duplicate or drop a runtime -> napplet message.

      Parameters

      • windowId: string
      • message: unknown

      Returns unknown[]