kernl API
    Preparing search index...

    Function refuseCurrentDispatch

    • Make the runtime firewall refuse the envelope kehto is about to dispatch for an applet, and only that one.

      kehto calls onNappletMessage synchronously, then evaluates the runtime firewall and dispatches in the same call, and ignores the callback's answer (D-012). kernl's guard layers judge each envelope in that callback: a burst above the per-second rate, a request over the unfocused budget, an oversized download or query (the runtime measures size only for envelopes that carry an event), and any non-control request from a hidden window. When one of them will not let an envelope through, the applet's policy is set to deny for the rest of this dispatch: kehto answers the request with a firewall denial instead of handing it to a service, and the previous policy returns in a microtask, before the next port message can arrive.

      Parameters

      • firewallState: Pick<FirewallStateContainer, "getConfig" | "setPolicy">

        bridge.runtime.firewallState.

      • napplet: string

        Applet identity (dTag) of the window whose envelope is being dispatched.

      Returns void

      Nothing; the policy is restored in a microtask.

      onNappletMessage: (windowId, message) => {
      if (pipeline.observe(windowId, dTag, message) === 'reject') refuseCurrentDispatch(bridge.runtime.firewallState, dTag);
      };