Convert isAllowlisted to return an array of filters instead of a boolean
Replace reporting.isAllowlisted
with filters.getAllowingFilters
implementing following interface:
/**
* Returns allowlisted filters for specific document.
* @param {number} tabId The id of the tab to lookup.
* @param {Object} [options]
* @param {number} [options.frameId=0] The id of the frame to lookup.
* @param {Array.<string>} [options.types=["document"]]
* The types of filters to consider.
* These can be any of "document", "elemhide",
* "genericblock", and "generichide".
* @return {Array.<string>}
*/
function getAllowingFilters(tabId, options = {})
{
let {frameId, types} = {frameId: 0, types: ["document"], ...options};
...
}
Refer to https://gitlab.com/eyeo/adblockplus/webext-sdk/-/issues/23#note_580057507 and https://gitlab.com/eyeo/adblockplus/webext-sdk/-/merge_requests/129#note_593107933 for context and use cases.
Edited by Sebastian Noack