-1

I want to get window object of current tab from popup.js but I can't find a way to do that. i keep getting the popup's window object

I tried just accessing window but it got the popup's window

Eyal B
  • 6
  • 1

1 Answers1

0

You need to filter window Types
Doc link method-getLastFocused

chrome.windows.getLastFocused({ windowTypes: ["normal"] }, (win) => console.log(win));
Anil kumar
  • 1,216
  • 4
  • 12