DSBridge v3.0 is a milestone, Compared with v2.0.X, we have made a lot of changes. Note that V3.0 is incompatible with V2.0, but v2.0 will continue to maintain. If you are a new user, use >=v3.0
Deprecated:setJavascriptInterface , use addJavascriptObject
instead.
Deprecated:setJavascriptContextInitedListener ,callHandler
can be called at any time.
Deprecated:DUIWebView , UIWebView
will not be supported ever.
New: addJavascriptObject:(id) object namespace:(NSString *) namespace
New: removeJavascriptObject:NSString * namespace
New: disableJavascriptDialogBlock:(bool) disable
New: hasJavascriptMethod:(NSString *) handlerName methodExistCallback:(void(^ )(bool exist))callback
New: setJavascriptCloseWindowListener:(void(^)(void))callback
New: setDebugMode:(bool) debug
New feature: Support namespace
New feature: Can add multiple API object
Changed: Object-c API signature changed
Changed: callHandler
can be called at any time.
hasNativeMethod(handlerName,[type])
disableJavascriptDialogBlock(disable)
registerAsyn(methodName|namespace,function|asyApiObject)
register(methodName|namespace,function|synApiObject)
It is well known that WKWebView loads web pages faster and more efficiently than UIWebView, and also doesn't have as much memory overhead for you.
Under the current timeline, most iOS apps only support iOS 9.0+.
The reason for the iOS platform cross-domain access vulnerability is due to UIWebView turning on the WebKitAllowUniversalAccessFromFileURLs and WebKitAllowFileAccessFromFileURLs options.
WKWebView default allowFileAccessFromFileURLs and allowUniversalAccessFromFileURLs option is false.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。