kernl API
    Preparing search index...

    Function mountApplet

    • Put a planned applet into a frame, in the NIP-5D order the shell depends on: harden the frame, register its window with the verified identity, freeze its environment, start watching for a second load, then assign srcdoc. The status moves to running on the frame's first load.

      close() revokes the binding through the bridge, which closes the port and destroys sessions and grants, then removes the frame. When the bridge revokes the binding on its own, revoked() removes the frame and tells the host. The frame is removed on every revocation reason; it is never reused.

      Parameters

      • plan: MountPlan

        The plan from planMount.

      • frame: FrameLike

        An iframe, or any object with its shape, already in the DOM.

      • deps: MountDeps

        Bridge, origin registry, guard hooks and the host's revocation callback.

      Returns MountedApplet

      The running applet's handle.

      invalid:frame-detached when the frame has no contentWindow.

      const handle = mountApplet(plan, iframe, { bridge, originRegistry, guard, onRevoked });
      handle.setVisibility({ visible: true, focused: true });
      handle.close();