I can get browser tabs using a match pattern
browser.tabs.query({ url: 'https://mozilla.org/*/b/*/' })
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns
During an update event of a tab I can get the tab id and the url, but how do I test that the tab matches my original match pattern?
browser.tabs.onUpdated.addListener(event => {
browser.tabs.get(event).then((tab) => {
if (tab.status === 'complete') {
if (?? tab.url matches 'https://mozilla.org/*/b/*/') {
console.log("Do something")
}
}
})
});