bool WebViewImpl::shouldStartLoading(const int viewTag, const std::string &url) { auto it = s_WebViewImpls.find(viewTag); if (it != s_WebViewImpls.end()) { auto webView = s_WebViewImpls[viewTag]->_webView; if (webView->_onShouldStartLoading) { return webView->_onShouldStartLoading(webView, url); } } return true; }
bool WebViewImpl::shouldStartLoading(const int viewTag, const std::string &url) { bool allowLoad = true; auto it = s_WebViewImpls.find(viewTag); if (it != s_WebViewImpls.end()) { auto webView = it->second->_webView; if (webView->_onShouldStartLoading) { allowLoad = webView->_onShouldStartLoading(webView, url); } } return allowLoad; }