I'm finding that chrome.tabs.query({active: true, currentWindow: true} is always returning 0 length array in chrome
Reported by
nkatsika...@gmail.com,
Jul 6 2017
|
||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36
Steps to reproduce the problem:
1. make a background.js file for a chrome extensions
2. use this code
chrome.browserAction.onClicked.addListener(function (activeTab) {
chrome.tabs.query({ currentWindow: true, active: true }, function (tabs) {
chrome.tabs.sendMessage(tabs[0].id, { greeting: "hello" }, function (response) {
console.log(response.farewell);
});
});
});
3. click on the browser extension button and debug this code, you will see the 0 length array
What is the expected behavior?
to have the current tab returned
What went wrong?
0 length array where I expected the current active tab
Did this work before? N/A
Chrome version: 59.0.3071.115 Channel: stable
OS Version: OS X 10.12.5
Flash Version:
nope
,
Jul 6 2017
bug invalid, please ignore
,
Jul 7 2017
As per comment #2 closing this issue. |
||
►
Sign in to add a comment |
||
Comment 1 by nkatsika...@gmail.com
, Jul 6 2017