Call a native method via JS Bridge.
Method name (must match BridgeMethod)
Optional params: Record<string, any>Optional parameters object
Promise that resolves with native response result
Static getSingleton access. The bridge client is global by nature (one WebView = one native bridge).
HuaweiBridgeClient encapsulates the JS Bridge communication between Web and HarmonyOS native. It provides a Promise-based
call()API that internally serializes requests and matches them with async native responses.Native side injects
window.aigensHuaweiobject via javaScriptProxy. Responses come back viawindow.aigensHuaweiCallback(id, result)andwindow.aigensHuaweiError(id, error).