aboutsummaryrefslogtreecommitdiffstats
path: root/extension
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2020-12-29 02:35:03 -0800
committerOmar Rizwan <omar@omar.website>2020-12-29 02:35:03 -0800
commit5f15ab1c379fcd254785a398775fe12ceefdbe60 (patch)
treeb27e7e589c1434691cddad7c4a86c206498cf64f /extension
parentb8181bd6f520bbb7f6aa2b26cf0d05ed5a0a9545 (diff)
improve test reliability; try clear scriptsForTab (doesn't work yet)
Diffstat (limited to 'extension')
-rw-r--r--extension/background.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/extension/background.js b/extension/background.js
index ab15933..4de9b67 100644
--- a/extension/background.js
+++ b/extension/background.js
@@ -84,14 +84,13 @@ const BrowserState = { scriptsForTab: {} };
chrome.debugger.onEvent.addListener((source, method, params) => {
console.log(source, method, params);
- if (method === "Page.") {
+ if (method === "Page.frameStartedLoading") {
// we're gonna assume we're always plugged into both Page and Debugger.
BrowserState.scriptsForTab[source.tabId] = [];
} else if (method === "Debugger.scriptParsed") {
BrowserState.scriptsForTab[source.tabId] = BrowserState.scriptsForTab[source.tabId] || [];
BrowserState.scriptsForTab[source.tabId].push(params);
- // FIXME: clear these out when page changes in tab (how?)
}
});
})();