add view response callback

This commit is contained in:
pengfei.zhou
2019-07-18 13:13:19 +08:00
parent e6bc920ab7
commit b06e31fac6
4 changed files with 42 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
import { uniqueId } from "../util/uniqueId";
import { loge } from "../util/log";
/**
* ``` TypeScript
@@ -27,19 +28,6 @@ declare function nativeRequire(moduleName: string): boolean
declare function nativeBridge(contextId: string, namespace: string, method: string, args?: any, callbackId?: string): boolean
export function log(message: any) {
console.log(message)
}
export function loge(message: any) {
console.error(message)
}
export function logw(message: any) {
console.warn(message)
}
export function jsCallResolve(contextId: string, callbackId: string, args?: any) {
const context = gContexts.get(contextId)
if (context === undefined) {