WebViewBridge

interface WebViewBridge

通过脚本操作网页端的桥接口.

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun callHandler(functionName: String, params: String?, callback: (String?) -> Unit?): Result

调用网页端js函数.

Link copied to clipboard
abstract fun evaluateJsFile(file: ScriptFile, repeatable: Boolean, callback: (String?) -> Unit?): Result

执行js文件.

Link copied to clipboard
abstract fun evaluateJsString(content: String, repeatable: Boolean, callback: (String?) -> Unit?): Result

执行js字符串.

Link copied to clipboard
abstract fun registerHandler(handlerName: String, handler: (params: String?) -> String?): Result

注册让网页端js调用的处理器.

Link copied to clipboard
abstract fun unregisterHandler(handlerName: String): Result

取消注册让网页端js调用的处理器.