WebExtensions - Incorrect argument types for webNavigation.onCompleted

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”.

Filtering is not yet implemented in Firefox, according to the exact same docs you linked.

D’oh! I figured I might have missed something.

Thanks for pointing that out. It gives me hope that you mentioned that this is “not yet” implemented…

Oh, it’s actually been implemented in Firefox 50 (current Nightly): https://bugzilla.mozilla.org/show_bug.cgi?id=1242522

If this also happens in Nightly, I’d assume it gets rejected because a value for a filter is not valid or else it’s a bug with the implementation.