foo-webview-sdk
    Preparing search index...

    Function bootstrapSmpCompat

    foo-webview-sdk/smp-compat — Spider Monkey Panel compatibility entry.

    ESM consumers import the bootstrap helper plus the wrapper classes and types directly:

    import { bootstrapSmpCompat, FbMetadbHandle } from 'foo-webview-sdk/smp-compat';
    import { fb } from 'foo-webview-sdk/bridge';

    const { smp, plman } = bootstrapSmpCompat(fb);
    window.smp = smp;
    window.plman = plman;

    The IIFE bundle (dist/smp-compat.global.js) consumed by <script>- tag themes wires the same call automatically — see "./iife". Reading window.fb from the IIFE keeps a single runtime fb instance shared across dist/bridge.global.js + dist/smp-compat.global.js.

    • Bootstrap the SMP compatibility layer against fb.

      Side effects performed:

      1. Build the cache + dispose array.
      2. Wire bridge.on(...) subscriptions for cache sync.
      3. Build plman using buildPlman.
      4. Attach SMP-style methods / properties to fb via attachFbExtensions.
      5. Attach fb.onSMP(...) via createOnSmp.
      6. Attach window.GetProperty / SetProperty / NotifyOthers via attachWindowProperties.
      7. Kick off the initial populateCache + wrappersInstalled.resolve().

      Parameters

      • fb: SmpBridgeShape

      Returns SmpBootstrapResult

      A SmpBootstrapResult aggregate the caller should install onto window.*. The IIFE entry does that at script load; ESM consumers may install selectively.