diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index 8d5bcfe35..1a87b9c70 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -1648,7 +1648,8 @@ CefRefPtr CefBrowserHostImpl::GetFrameForRequest( // The value of |IsMainFrame| is unreliable in these cases. const bool is_main_frame_state_flaky = info->IsDownload() || - info->GetResourceType() == content::RESOURCE_TYPE_XHR; + info->GetResourceType() == content::RESOURCE_TYPE_XHR || + info->GetResourceType() == content::RESOURCE_TYPE_SCRIPT; return GetOrCreateFrame(info->GetRenderFrameID(), info->GetFrameTreeNodeId(), CefFrameHostImpl::kUnspecifiedFrameId, info->IsMainFrame(), is_main_frame_state_flaky,