diff --git a/packages/core/src/bridge.ts b/packages/core/src/bridge.ts index 50e2121..87b9825 100644 --- a/packages/core/src/bridge.ts +++ b/packages/core/src/bridge.ts @@ -367,6 +367,16 @@ export function createVKBridge(version: string): VKBridge { } } + subscribe((event) => { + if (!event.detail) { + return; + } + switch (event.detail.type) { + case 'SetSupportedHandlers': + supportedHandlers = event.detail.data.supportedHandlers; + } + }); + return { send: sendPromise, sendPromise, diff --git a/packages/core/src/types/data.ts b/packages/core/src/types/data.ts index 0f5261b..5829352 100644 --- a/packages/core/src/types/data.ts +++ b/packages/core/src/types/data.ts @@ -1701,6 +1701,7 @@ export type ReceiveEventMap = EventReceiveNames< 'VKWebAppCallGetStatusFailed' > & EventReceiveNames<'VKWebAppRecommend', 'VKWebAppRecommendResult', 'VKWebAppRecommendFailed'> & + EventReceiveNames<'SetSupportedHandlers', 'SetSupportedHandlers', 'SetSupportedHandlersFailed'> & EventReceiveNames< 'VKWebAppAddToProfile', 'VKWebAppAddToProfileResult',