Commit 004f6c9e authored by Georgiana Piscoi's avatar Georgiana Piscoi

Fixed #36 - Don't pass frameId to tabs.executeScript on Edge

parent a9d29d87
Pipeline #83397082 passed with stage
in 1 minute and 3 seconds
......@@ -155,12 +155,19 @@ function executeScript(script, tabId, frameId)
return browser.tabs.executeScript(tabId, {
let details = {
code: getExecutableCode(script),
matchAboutBlank: true,
runAt: "document_start",
}).catch(error =>
runAt: "document_start"
// Microsoft Edge throws when passing frameId to tabs.executeScript
// and always executes code in the context of the top-level frame,
// so for sub-frames we let it fail.
if (frameId != 0)
details.frameId = frameId;
return browser.tabs.executeScript(tabId, details).catch(error =>
// Sometimes a frame is added and removed very quickly, in such cases we
// simply ignore the error.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment