WebView

interface WebView : Variable

在脚本中使用 WebView 的接口.

Author

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

Functions

Link copied to clipboard
abstract fun getBridge(): WebViewBridge

获取 WebViewBridge, 用于与 WebView 交互.

Link copied to clipboard
abstract fun getGlobalName(): String

获取作为全局变量时的名称.

Link copied to clipboard
abstract fun getPublicType(): Type

获取 Variable 注入到脚本时需要显示的类型.

Link copied to clipboard
abstract fun getWebView(): WebView?

获取 WebView 对象.

Link copied to clipboard
abstract fun isPrefixRequired(): Boolean

是否需要添加前缀, 每种编程语言添加的前缀不一样, 前缀可以通过 Language.getVariablePrefix 获取.

Link copied to clipboard
abstract fun isSuffixRequired(): Boolean

是否需要添加后缀, 每种编程语言添加的后缀不一样, 后缀可以通过 Language.getVariableSuffix 获取.

Link copied to clipboard
abstract fun setUrl(url: String)

设置界面的url,如果没有设置的话就只能是脚本工程而不是脚本文件,脚本文件可以是使用ui.