From efb875c1e61b781054df49345350c0cac691082b Mon Sep 17 00:00:00 2001 From: Jason Date: Mon, 8 Jul 2024 15:11:36 +0800 Subject: [PATCH] add interfaces Change-Id: I250862662fd80e3086433844c38d7efdbbf8a9cc --- .../kits/cj/include/webview_controller_impl.h | 25 ++ interfaces/kits/cj/include/webview_ffi.h | 16 + .../webview_javascript_result_callback.h | 2 + .../kits/cj/src/webview_controller_impl.cpp | 124 ++++++++ interfaces/kits/cj/src/webview_ffi.cpp | 281 ++++++++++++++++++ .../webview_javascript_result_callback.cpp | 5 + 6 files changed, 453 insertions(+) diff --git a/interfaces/kits/cj/include/webview_controller_impl.h b/interfaces/kits/cj/include/webview_controller_impl.h index ddcb4a51d..c4efa0998 100644 --- a/interfaces/kits/cj/include/webview_controller_impl.h +++ b/interfaces/kits/cj/include/webview_controller_impl.h @@ -77,6 +77,29 @@ namespace OHOS::Webview { ErrCode LoadData(std::string data, std::string mimeType, std::string encoding, std::string baseUrl, std::string historyUrl); + int32_t PreFetchPage(std::string url); + + int32_t PreFetchPage(std::string url, std::map headers); + + int32_t SetAudioMuted(bool mute); + + void SlideScroll(float vx, float vy); + + void PutNetworkAvailable(bool enable); + + void ClearClientAuthenticationCache(); + + void ClearSslCache(); + + void SearchNext(bool forward); + + void ClearMatches(); + + void SearchAllAsync(std::string str); + + ErrCode DeleteJavaScriptRegister(const std::string& objName, +const std::vector& methodList); + void Refresh(); std::string GetUserAgent(); @@ -119,6 +142,8 @@ namespace OHOS::Webview { int32_t ZoomOut(); + int32_t RequestFocus(); + void ClearHistory(); bool AccessStep(int32_t step); diff --git a/interfaces/kits/cj/include/webview_ffi.h b/interfaces/kits/cj/include/webview_ffi.h index af456fc2c..4dce1be2e 100644 --- a/interfaces/kits/cj/include/webview_ffi.h +++ b/interfaces/kits/cj/include/webview_ffi.h @@ -31,7 +31,12 @@ extern "C" { FFI_EXPORT int32_t FfiOHOSWebviewCtlLoadUrlWithHeaders(int64_t id, char *url, OHOS::Webview::ArrWebHeader headers); FFI_EXPORT int32_t FfiOHOSWebviewCtlLoadData(int64_t id, OHOS::Webview::LoadDatas loadDatas); FFI_EXPORT int32_t FfiOHOSWebviewCtlRefresh(int64_t id); + FFI_EXPORT int32_t FFiOHOSWebviewCtlPreFetchPage(int64_t id, char* url); + FFI_EXPORT int32_t FFiOHOSWebviewCtlPreFetchPageWithHeaders(int64_t id, char* url, OHOS::Webview::ArrWebHeader headers); + FFI_EXPORT int32_t FfiOHOSWebviewCtlSetAudioMuted(int64_t id, bool mute); FFI_EXPORT char *FfiOHOSWebviewCtlGetUserAgent(int64_t id, int32_t *errCode); + FFI_EXPORT int32_t FfiOHOSWebviewCtlSetConnectionTimeout(int32_t timeout); + FFI_EXPORT int32_t FfiOHOSWebviewCtlGetWebId(int64_t id, int32_t *errCode); FFI_EXPORT bool FfiOHOSWebviewCtlAccessForward(int64_t id, int32_t *errCode); FFI_EXPORT bool FfiOHOSWebviewCtlAccessBackward(int64_t id, int32_t *errCode); FFI_EXPORT int32_t FfiOHOSWebviewCtlSetCustomUserAgent(int64_t id, char *cUserAgent); @@ -54,6 +59,7 @@ extern "C" { FFI_EXPORT int32_t FfiOHOSWebviewCtlZoom(int64_t id, float factor); FFI_EXPORT int32_t FfiOHOSWebviewCtlZoomIn(int64_t id); FFI_EXPORT int32_t FfiOHOSWebviewCtlZoomOut(int64_t id); + FFI_EXPORT int32_t FfiOHOSWebviewCtlRequestFocus(int64_t id); FFI_EXPORT int32_t FfiOHOSWebviewCtlClearHistory(int64_t id); FFI_EXPORT bool FfiOHOSWebviewCtlAccessStep(int64_t id, int32_t *errCode, int32_t step); FFI_EXPORT int32_t FfiOHOSWebviewCtlOnActive(int64_t id); @@ -69,6 +75,16 @@ extern "C" { FFI_EXPORT int32_t FfiOHOSWebviewCtlRemoveCache(int64_t id, bool clearRom); FFI_EXPORT int64_t FfiOHOSWebviewCtlGetBackForwardEntries(int64_t id, int32_t *errCode); FFI_EXPORT int32_t FfiOHOSWebviewCtlStop(int64_t id); + FFI_EXPORT int64_t FfiOHOSWebviewCtlGetFavicon(int64_t id, int32_t *errCode); + FFI_EXPORT int32_t FfiOHOSWebviewCtlPrepareForPageLoad(char *url, bool preconnectable, int32_t numSockets); + FFI_EXPORT int32_t FfiOHOSWebviewCtlSlideScroll(int64_t id, float vx, float vy); + FFI_EXPORT int32_t FfiOHOSWebviewCtlSetNetworkAvailable(int64_t id, bool enable); + FFI_EXPORT int32_t FfiOHOSWebviewCtlClearClientAuthenticationCache(int64_t id); + FFI_EXPORT int32_t FfiOHOSWebviewCtlClearSslChache(int64_t id); + FFI_EXPORT int32_t FfiOHOSWebviewCtlSearchNext(int64_t id, bool forward); + FFI_EXPORT int32_t FfiOHOSWebviewCtlClearMatches(int64_t id); + FFI_EXPORT int32_t FfiOHOSWebviewCtlSearchAllAsync(int64_t id, char *searchString); + FFI_EXPORT int32_t FfiOHOSWebviewCtlDeleteJavaScriptRegister(int64_t id, char *name); // BackForwardList FFI_EXPORT int32_t FfiOHOSBackForwardListCurrentIndex(int64_t id, int32_t *errCode); diff --git a/interfaces/kits/cj/include/webview_javascript_result_callback.h b/interfaces/kits/cj/include/webview_javascript_result_callback.h index bc4c56379..227055e0f 100644 --- a/interfaces/kits/cj/include/webview_javascript_result_callback.h +++ b/interfaces/kits/cj/include/webview_javascript_result_callback.h @@ -153,6 +153,8 @@ public: void RemoveTransientJavaScriptObject() override; + bool DeleteJavaScriptRegister(const std::string &objName); + int32_t GetNWebId() { return nwebId_; diff --git a/interfaces/kits/cj/src/webview_controller_impl.cpp b/interfaces/kits/cj/src/webview_controller_impl.cpp index 10b83226c..9481b88e0 100644 --- a/interfaces/kits/cj/src/webview_controller_impl.cpp +++ b/interfaces/kits/cj/src/webview_controller_impl.cpp @@ -24,6 +24,9 @@ #include "webview_log.h" #include "webview_utils.h" #include "nweb_store_web_archive_callback.h" +#include +#include "web_errors.h" + namespace OHOS::Webview { std::unordered_map g_webview_controller_map; @@ -108,6 +111,27 @@ namespace OHOS::Webview { return nweb_ptr->LoadWithDataAndBaseUrl(baseUrl, data, mimeType, encoding, historyUrl); } + int32_t WebviewControllerImpl::PreFetchPage(std::string url) + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if(!nweb_ptr) { + return NWebError::INIT_ERROR; + } + std::map httpHeaders; + nweb_ptr->PrefetchPage(url, httpHeaders); + return NWebError::NO_ERROR; + } + + int32_t WebviewControllerImpl::PreFetchPage(std::string url, std::map httpHeaders) + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if(!nweb_ptr) { + return NWebError::INIT_ERROR; + } + nweb_ptr->PrefetchPage(url, httpHeaders); + return NWebError::NO_ERROR; + } + void WebviewControllerImpl::Refresh() { auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); @@ -116,6 +140,16 @@ namespace OHOS::Webview { } } + int32_t WebviewControllerImpl::SetAudioMuted(bool mute) + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if(!nweb_ptr) { + return NWebError::INIT_ERROR; + } + nweb_ptr->SetAudioMuted(mute); + return NWebError::NO_ERROR; + } + std::string WebviewControllerImpl::GetUserAgent() { auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); @@ -329,6 +363,17 @@ namespace OHOS::Webview { return result; } + int32_t WebviewControllerImpl::RequestFocus() + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if (!nweb_ptr) { + return NWebError::INIT_ERROR; + } + nweb_ptr->OnFocus(); + ErrCode result = NWebError::NO_ERROR; + return result; + } + void WebviewControllerImpl::ClearHistory() { auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); @@ -607,4 +652,83 @@ namespace OHOS::Webview { } return; } + + void WebviewControllerImpl::SlideScroll(float vx, float vy) + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if (nweb_ptr) { + return nweb_ptr->SlideScroll(vx, vy); + } + return; + } + + void WebviewControllerImpl::PutNetworkAvailable(bool enable) + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if (nweb_ptr) { + return nweb_ptr->PutNetworkAvailable(enable); + } + return; + } + + void WebviewControllerImpl::ClearClientAuthenticationCache() + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if (nweb_ptr) { + return nweb_ptr->ClearClientAuthenticationCache(); + } + return; + } + + void WebviewControllerImpl::ClearSslCache() + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if (nweb_ptr) { + return nweb_ptr->ClearSslCache(); + } + return; + } + + void WebviewControllerImpl::SearchNext(bool forward) + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if (nweb_ptr) { + return nweb_ptr->FindNext(forward); + } + return; + } + + void WebviewControllerImpl::ClearMatches() + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if (nweb_ptr) { + return nweb_ptr->ClearMatches(); + } + return; + } + + void WebviewControllerImpl::SearchAllAsync(std::string str) + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if (nweb_ptr) { + return nweb_ptr->FindAllAsync(str); + } + return; + } + + ErrCode WebviewControllerImpl::DeleteJavaScriptRegister(const std::string& objName, + const std::vector& methodList) + { + auto nweb_ptr = NWeb::NWebHelper::Instance().GetNWeb(nwebId_); + if (nweb_ptr) { + nweb_ptr->UnregisterArkJSfunction(objName, methodList); + } + if(javaScriptResultCb_) { + bool ret = javaScriptResultCb_->DeleteJavaScriptRegister(objName); + if(!ret) { + return NWebError::CANNOT_DEL_JAVA_SCRIPT_PROXY; + } + } + return NWebError::NO_ERROR; + } } diff --git a/interfaces/kits/cj/src/webview_ffi.cpp b/interfaces/kits/cj/src/webview_ffi.cpp index 62028c2aa..867b6695c 100644 --- a/interfaces/kits/cj/src/webview_ffi.cpp +++ b/interfaces/kits/cj/src/webview_ffi.cpp @@ -25,6 +25,7 @@ #include "pixel_map.h" #include "cj_lambda.h" #include "pixel_map_impl.h" +#include using namespace OHOS::FFI; using namespace OHOS::NWeb; @@ -32,6 +33,10 @@ using namespace OHOS::NWeb; namespace OHOS { namespace Webview { +constexpr uint32_t SOCKET_MAXIMUM = 6; +constexpr uint32_t URL_MAXIMUM = 2048; +constexpr char URL_REGEXPR[] = "^http(s)?:\\/\\/.+"; + extern "C" { int64_t FfiOHOSWebviewCtlConstructor() { @@ -156,6 +161,82 @@ extern "C" { return ret; } + int32_t FfiOHOSWebviewCtlPreFetchPage(int64_t id, char *url) + { + auto nativeWebviewCtl = FFIData::GetData(id); + if (nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + return NWebError::INIT_ERROR; + } + std::string webSrc = url; + if(webSrc.size() > URL_MAXIMUM) { + WEBVIEWLOGE("The URL exceeds the maximum length of %{public}d", URL_MAXIMUM); + return NWebError::PARAM_CHECK_ERROR; + } + + if(!regex_match(webSrc, std::regex(URL_REGEXPR, std::regex_constants::icase))) { + WEBVIEWLOGE("ParsePrepareUrl error"); + return NWebError::PARAM_CHECK_ERROR; + } + int32_t ret = nativeWebviewCtl->PreFetchPage(webSrc); + if (ret != NWebError::NO_ERROR) { + if (ret == NWebError::NWEB_ERROR) { + return ret; + } + } + return ret; + } + + int32_t FfiOHOSWebviewCtlPreFetchPageWithHeaders(int64_t id, char *url, ArrWebHeader headers) + { + auto nativeWebviewCtl = FFIData::GetData(id); + if (nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + return NWebError::INIT_ERROR; + } + std::string webSrc = url; + if(webSrc.size() > URL_MAXIMUM) { + WEBVIEWLOGE("The URL exceeds the maximum length of %{public}d", URL_MAXIMUM); + return NWebError::PARAM_CHECK_ERROR; + } + + if(!regex_match(webSrc, std::regex(URL_REGEXPR, std::regex_constants::icase))) { + WEBVIEWLOGE("ParsePrepareUrl error"); + return NWebError::PARAM_CHECK_ERROR; + } + std::map httpHeaders; + uint32_t arrayLength = static_cast(headers.size); + for(uint32_t i = 0; i < arrayLength; ++i) { + std::string key = headers.head[i].headerKey; + std::string value = headers.head[i].headerValue; + httpHeaders[key] = value; + } + + int32_t ret = nativeWebviewCtl->PreFetchPage(webSrc, httpHeaders); + if (ret != NWebError::NO_ERROR) { + if (ret == NWebError::NWEB_ERROR) { + WEBVIEWLOGE("preFetchPage failed."); + return ret; + } + } + return ret; + } + + int32_t FfiOHOSWebviewCtlSetAudioMuted(int64_t id, bool mute) + { + auto nativeWebviewCtl = FFIData::GetData(id); + if (nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + return NWebError::INIT_ERROR; + } + int32_t ret = nativeWebviewCtl->SetAudioMuted(mute); + if (ret != NWebError::NO_ERROR) { + if (ret == NWebError::NWEB_ERROR) { + WEBVIEWLOGE("SetAudioMuted failed, error code: %{public}d", ret); + return ret; + } + } + WEBVIEWLOGI("SetAudioMuted: %{public}s", (mute ? "true" : "false")); + return ret; + } + int32_t FfiOHOSWebviewCtlRefresh(int64_t id) { auto nativeWebviewCtl = FFIData::GetData(id); @@ -179,6 +260,19 @@ extern "C" { return MallocCString(userAgent); } + int32_t FfiOHOSWebviewCtlGetWebId(int64_t id, int32_t *errCode) + { + auto nativeWebviewCtl = FFIData::GetData(id); + if (nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + *errCode = NWebError::INIT_ERROR; + return -1; + } + int32_t webId = -1; + webId = nativeWebviewCtl->GetWebId(); + *errCode = NWebError::NO_ERROR; + return webId; + } + bool FfiOHOSWebviewCtlAccessForward(int64_t id, int32_t *errCode) { auto nativeWebviewCtl = FFIData::GetData(id); @@ -470,6 +564,16 @@ extern "C" { return ret; } + int32_t FfiOHOSWebviewCtlRequestFocus(int64_t id) + { + auto nativeWebviewCtl = FFIData::GetData(id); + if (nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + return NWebError::INIT_ERROR; + } + int32_t ret = nativeWebviewCtl->RequestFocus(); + return ret; + } + int32_t FfiOHOSWebviewCtlClearHistory(int64_t id) { auto nativeWebviewCtl = FFIData::GetData(id); @@ -738,6 +842,44 @@ extern "C" { return nativeImage->GetID(); } + int64_t FfiOHOSWebviewCtlGetFavicon(int64_t id, int32_t *errCode) + { + int64_t ret = -1; + auto nativeWebviewCtl = FFIData::GetData(id); + if (nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + *errCode = NWebError::INIT_ERROR; + return ret; + } + std::shared_ptr list = nativeWebviewCtl->GetHistoryList(); + if(!list) { + *errCode = NWebError::INIT_ERROR; + return ret; + } + auto nativeWebHistoryListImpl = FFIData::Create(list); + if(nativeWebHistoryListImpl == nullptr) { + *errCode = NWebError::INIT_ERROR; + WEBVIEWLOGE("new WebHistoryListImpl failed"); + return ret; + } + int32_t index = nativeWebHistoryListImpl->GetCurrentIndex(); + if(index >= nativeWebHistoryListImpl->GetListSize() || index < 0) { + *errCode = NWebError::PARAM_CHECK_ERROR; + return ret; + } + std::shared_ptr item = nativeWebHistoryListImpl->GetItem(index); + if(!item) { + *errCode = NWebError::NWEB_ERROR; + return ret; + } + ret = GetFavicon(item); + if(!ret){ + *errCode = NWebError::NWEB_ERROR; + return ret; + } + *errCode = NWebError::NO_ERROR; + return ret; + } + CHistoryItem FfiOHOSGetItemAtIndex(int64_t id, int32_t index, int32_t *errCode) { CHistoryItem ret = {.icon = -1, .historyUrl = nullptr, .historyRawUrl = nullptr, .title = nullptr}; @@ -762,6 +904,145 @@ extern "C" { *errCode = NWebError::NO_ERROR; return ret; } + + int32_t FfiOHOSWebviewCtlPrepareForPageLoad(char *url, bool preconnectable, int32_t numSockets) + { + int32_t ret = -1; + std::string webSrc = url; + if(webSrc.size() > URL_MAXIMUM) { + WEBVIEWLOGE("The URL exceeds the maximum length of %{public}d", URL_MAXIMUM); + return NWebError::PARAM_CHECK_ERROR; + } + + if(!regex_match(webSrc, std::regex(URL_REGEXPR, std::regex_constants::icase))) { + WEBVIEWLOGE("ParsePrepareUrl error"); + return NWebError::PARAM_CHECK_ERROR; + } + + if(numSockets <= 0 || static_cast(numSockets) > SOCKET_MAXIMUM) + { + return NWebError::PARAM_CHECK_ERROR; + } + NWeb::NWebHelper::Instance().PrepareForPageLoad(webSrc, preconnectable, numSockets); + ret = NWebError::NO_ERROR; + return ret; + } + + int32_t FfiOHOSWebviewCtlSetConnectionTimeout(int32_t timeout) + { + int32_t ret = -1; + if(timeout <= 0){ + return NWebError::PARAM_CHECK_ERROR; + } + NWeb::NWebHelper::Instance().SetConnectionTimeout(timeout); + ret = NWebError::NO_ERROR; + return ret; + } + + int32_t FfiOHOSWebviewCtlSlideScroll(int64_t id, float vx, float vy) + { + int32_t ret = -1; + auto nativeWebviewCtl = FFIData::GetData(id); + if(nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + ret = NWebError::INIT_ERROR; + return ret; + } + nativeWebviewCtl->SlideScroll(vx, vy); + ret = NWebError::NO_ERROR; + return ret; + } + + int32_t FfiOHOSWebviewCtlSetNetworkAvailable(int64_t id, bool enable) + { + int32_t ret = -1; + auto nativeWebviewCtl = FFIData::GetData(id); + if(nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + ret = NWebError::INIT_ERROR; + return ret; + } + nativeWebviewCtl->PutNetworkAvailable(enable); + ret = NWebError::NO_ERROR; + return ret; + } + + int32_t FfiOHOSWebviewCtlClearClientAuthenticationCache(int64_t id) + { + int32_t ret = -1; + auto nativeWebviewCtl = FFIData::GetData(id); + if(nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + ret = NWebError::INIT_ERROR; + return ret; + } + nativeWebviewCtl->ClearClientAuthenticationCache(); + ret = NWebError::NO_ERROR; + return ret; + } + + int32_t FfiOHOSWebviewCtlClearSslCache(int64_t id) + { + int32_t ret = -1; + auto nativeWebviewCtl = FFIData::GetData(id); + if(nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + ret = NWebError::INIT_ERROR; + return ret; + } + nativeWebviewCtl->ClearSslCache(); + ret = NWebError::NO_ERROR; + return ret; + } + + int32_t FfiOHOSWebviewCtlSearchNext(int64_t id, bool forward) + { + int32_t ret = -1; + auto nativeWebviewCtl = FFIData::GetData(id); + if(nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + ret = NWebError::INIT_ERROR; + return ret; + } + nativeWebviewCtl->SearchNext(forward); + ret = NWebError::NO_ERROR; + return ret; + } + + int32_t FfiOHOSWebviewCtlClearMatches(int64_t id) + { + int32_t ret = -1; + auto nativeWebviewCtl = FFIData::GetData(id); + if(nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + ret = NWebError::INIT_ERROR; + return ret; + } + nativeWebviewCtl->ClearMatches(); + ret = NWebError::NO_ERROR; + return ret; + } + + int32_t FfiOHOSWebviewCtlSearchAllAsync(int64_t id, char * searchString) + { + int32_t ret = -1; + auto nativeWebviewCtl = FFIData::GetData(id); + if(nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + ret = NWebError::INIT_ERROR; + return ret; + } + std::string str = searchString; + nativeWebviewCtl->SearchAllAsync(str); + ret = NWebError::NO_ERROR; + return ret; + } + + int32_t FfiOHOSWebviewCtlDeleteJavaScriptRegister(int64_t id, char *name) + { + int32_t ret = -1; + auto nativeWebviewCtl = FFIData::GetData(id); + if(nativeWebviewCtl == nullptr || !nativeWebviewCtl->IsInit()) { + ret = NWebError::INIT_ERROR; + return ret; + } + std::string str = name; + ret = nativeWebviewCtl->DeleteJavaScriptRegister(str, {}); + return ret; + } } } } diff --git a/interfaces/kits/cj/src/webview_javascript_result_callback.cpp b/interfaces/kits/cj/src/webview_javascript_result_callback.cpp index f3ca8d1d0..de1cef8f2 100644 --- a/interfaces/kits/cj/src/webview_javascript_result_callback.cpp +++ b/interfaces/kits/cj/src/webview_javascript_result_callback.cpp @@ -380,6 +380,11 @@ bool WebviewJavaScriptResultCallBackImpl::HasJavaScriptObjectMethods(int32_t obj return ret; } +bool WebviewJavaScriptResultCallBackImpl::DeleteJavaScriptRegister(const std::string &objName) +{ + return RemoveNamedObject(objName); +} + void WebviewJavaScriptResultCallBackImpl::RemoveJavaScriptObjectHolder(int32_t holder, JavaScriptOb::ObjectID objectId) {} -- Gitee