Clear script ids in RemoveAllUserScripts()
This commit is contained in:
parent
5a30bbe38f
commit
5e35e6c635
@ -887,13 +887,13 @@ bool wxWebViewEdge::AddUserScript(const wxString& javascript,
|
|||||||
void wxWebViewEdge::RemoveAllUserScripts()
|
void wxWebViewEdge::RemoveAllUserScripts()
|
||||||
{
|
{
|
||||||
m_impl->m_pendingUserScripts.clear();
|
m_impl->m_pendingUserScripts.clear();
|
||||||
for (wxVector<wxString>::iterator it = m_impl->m_userScriptIds.begin();
|
for (auto& scriptId : m_impl->m_userScriptIds)
|
||||||
it != m_impl->m_userScriptIds.end(); ++it)
|
|
||||||
{
|
{
|
||||||
HRESULT hr = m_impl->m_webView->RemoveScriptToExecuteOnDocumentCreated(it->wc_str());
|
HRESULT hr = m_impl->m_webView->RemoveScriptToExecuteOnDocumentCreated(scriptId.wc_str());
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
wxLogApiError("RemoveScriptToExecuteOnDocumentCreated", hr);
|
wxLogApiError("RemoveScriptToExecuteOnDocumentCreated", hr);
|
||||||
}
|
}
|
||||||
|
m_impl->m_userScriptIds.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWebViewEdge::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
|
void wxWebViewEdge::RegisterHandler(wxSharedPtr<wxWebViewHandler> handler)
|
||||||
|
Loading…
Reference in New Issue
Block a user