Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: ext/background.js

Issue 29793570: Issue 6692 - Update frame structure for about:blank frames earlier (Closed)
Patch Set: Addressed nits Created May 29, 2018, 5:44 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ext/background.js
diff --git a/ext/background.js b/ext/background.js
index 7bf5e393f74b5785b4c83580edc63bee67410d85..a42a1ad021f31db063287b533d62c99bc29a77c0 100644
--- a/ext/background.js
+++ b/ext/background.js
@@ -259,6 +259,18 @@
{types: ["main_frame", "sub_frame"], urls: ["http://*/*", "https://*/*"]},
["responseHeaders"]);
+ browser.webNavigation.onBeforeNavigate.addListener(details =>
+ {
+ // Requests can be made by about:blank frames before the frame's
+ // onCommitted event has fired, so we update the frame structure
+ // for those now.
+ if (details.url == "about:blank")
+ {
+ updatePageFrameStructure(details.frameId, details.tabId, details.url,
+ details.parentFrameId);
+ }
+ });
+
browser.webNavigation.onCommitted.addListener(details =>
{
// We have to update the frame structure for documents that weren't
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld