| Index: ext/background.js |
| =================================================================== |
| --- a/ext/background.js |
| +++ b/ext/background.js |
| @@ -247,19 +247,21 @@ |
| details.parentFrameId); |
| }, |
| {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.startsWith("about:")) |
| + // onCommitted event has fired; besides, the parent frame's ID is not |
| + // available in onCommitted, nor is the onHeadersReceived event fired for |
| + // about: and data: frames; so we update the frame structure for such |
| + // frames here. |
| + if (details.url.startsWith("about:") || details.url.startsWith("data:")) |
| { |
| updatePageFrameStructure(details.frameId, details.tabId, details.url, |
| details.parentFrameId); |
| } |
| }); |
| browser.webNavigation.onCommitted.addListener(details => |
| { |