This commit is contained in:
IndieKKY
2024-10-05 20:04:42 +08:00
parent b385730152
commit 090651c4b5
3 changed files with 0 additions and 124 deletions

View File

@@ -75,25 +75,6 @@ class InjectMessage {
this.portMessageHandler!.startListen()
this.portMessageHandler!.init('inject')
this.methods = methods
// listen message from app
// startListening({}).then(e => {
// const { postMessage, listenMessage, destroy } = e
// this.postMessageToApp = postMessage
// listenMessage((method, params, sendResponse) => {
// this.messageHandler({
// from: 'app',
// target: MESSAGE_TARGET_INJECT,
// method,
// params,
// }, null, sendResponse)
// })
// }).catch(console.error)
/**
* listen message from extension
* Attention: return true if you need to sendResponse asynchronously
*/
// chrome.runtime.onMessage.addListener(this.messageHandler)
}
sendExtension = async <T = any>(method: string, params?: any): Promise<T> => {