This commit is contained in:
IndieKKY
2024-10-06 13:23:38 +08:00
parent 5c37ea9d4e
commit 6a921d4c5a
3 changed files with 29 additions and 34 deletions

View File

@@ -1,10 +1,8 @@
// 请求信息
export type L2ReqMsg = {
from: 'extension' | 'inject' | 'app'
// target: string
method: string
params?: any
// [key: string]: any
}
// 响应信息
@@ -14,8 +12,8 @@ export type L2ResMsg<L2Res = any> = {
data?: L2Res
}
export const MESSAGE_TO_EXTENSION_HANDSHAKE = 'handshake'
export const MESSAGE_TO_EXTENSION_ROUTE_MSG = 'routeMsg'
export const MESSAGE_TO_EXTENSION_HANDSHAKE = '_handshake'
export const MESSAGE_TO_EXTENSION_ROUTE_MSG = '_routeMsg'
export const TAG_TARGET_INJECT = 'target:inject'
export const TAG_TARGET_APP = 'target:app'