ink-cartridge
    Preparing search index...

    Function withOwner

    • Push owner onto the mounted engine's owner stack for the duration of fn, so a manual getEngine().boundKeyboard(...) (or any owner-scoped call) is attributed to that layer/page. The owner is popped in a finally so a throw inside fn cannot strand it on the stack.

      Type Parameters

      • T

      Parameters

      • owner: string | ComponentType<any>
      • fn: () => T

      Returns T

      withOwner(MyPage, () => getEngine().boundKeyboard(['a'], handler));