We’re interested in leveraging WebExtension support in FF now, but there are a few issues we’re running into. This first one’s rather major, though I hope it’s just a matter of me understanding things incorrectly.
var filter = {
url:
[
{hostContains: "localhost"},
{hostSuffix: "test.fake"}
]
};
function onCompleted(details)
{
if(details.frameId == 0)
{
// do something
}
}
chrome.webNavigation.onCompleted.addListener(onCompleted, filter);
With this simple block, we’re seeing this error thrown:
Error: Incorrect argument types for webNavigation.onCompleted.
Apparently it’s the format of the “filter” object, although it works fine in Chrome, and the Mozilla docs appear to convey that this is indeed correct.
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webNavigation/onCompleted
Thoughts?
EDIT: This snippet was culled from “background.js”.