chrome.tabs.query does not find match if url property is an array
Fixed, flighted Issue #9107332
Steps to reproduce
Open two tabs :
- First tab with URL : https://www.microsoft.com/
- Second tab : https://www.microsoftstore.com/store/msfr/fr_FR/home
In background code of a “chrome bridged” extension :
chrome.tabs.query({url:['https://www.microsoftstore.com/*','https://www.microsoft.com/*']}, function(tabsArray) {console.log(tabsArray);})
=> The array in the callback function is empty === no match
Then, call
chrome.tabs.query({url:['https://www.microsoftstore.com/*']}, function(tabsArray) {console.log(tabsArray);})
Then you have one match !
It seems query will check if all patterns match for a tab url…??
In Chrome extension : the query function returns tabs matching ANY of the pattern in the url array.
You need to sign in to your Microsoft account to add a comment.
Sign in