Created
September 18, 2019 00:09
-
-
Save ursi/2a3a712ea0d71d5d250a584904ae85cd to your computer and use it in GitHub Desktop.
Chromium API Bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let c = 0 | |
// removing the filter causes it to act normally | |
chrome.webNavigation.onCompleted.addListener(()=> console.log(++c), {url: [{urlEquals: `https://github.com/`}]}); | |
// commenting this out will cause the above listener to only fire once | |
chrome.webNavigation.onCompleted.addListener(()=> console.log(++c)); | |
// leaving it in will cause both of them to fire twice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "Bug", | |
"version": "1.0.0", | |
"background": { | |
"persistent": false, | |
"scripts": ["background.js"] | |
}, | |
"permissions": [ | |
"webNavigation" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Navigate to https://github.com and check the background page console.