v3.0 change list
wendux opened this issue · comments
DSBridge v3.0 change list
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
In Java
- Deprecated:
dwebview.setJavascriptInterface, useaddJavascriptObject
instead. - New:
addJavascriptObject(Object object, String namespace)
- New:
removeJavascriptObject(String namespace)
- New:
disableJavascriptDialogBlock(bool disable)
- New:
hasJavascriptMethod(String handlerName, OnReturnValue<Boolean> existCallback)
- New:
setJavascriptCloseWindowListener(JavascriptCloseWindowListener listener)
- New:
DWebView.setWebContentsDebuggingEnabled(boolean enabled)
- New feature: Support namespace
- Changed: Java API signature changed
- Changed:
callHandler
can be called at any time. - Changed: change
minSdkVersion
to 11.
In Javascript
- New:
hasNativeMethod(handlerName,[type])
- New:
disableJavascriptDialogBlock(disable)
- New:
registerAsyn(methodName|namespace,function|asyApiObject)
- Changed:
register(methodName|namespace,function|synApiObject)
- New feature: Support namespace
真的很佩服作者同时维护android&iOS版本的DSBridge
技不如人甘拜下风
谢谢了,刚好需要用到,感谢
引用换了
之前是
implementation 'com.github.wendux:DSBridge-Android:master-SNAPSHOT
现在是
implementation 'com.github.wendux:DSBridge-Android:3.0-SNAPSHOT
DSBridge v3.0之后,只需要引入一个版本,安卓iOS两端同时可用吗?