• Login
    • Search
    • Categories
    • Recent
    • Tags
    • Users
    • Groups
    • Rules
    • Help

    Do more on the web, with a fast and secure browser!

    Download Opera browser with:

    • built-in ad blocker
    • battery saver
    • free VPN
    Download Opera

    Tab highlighting API for extensions

    Opera for computers
    1
    1
    748
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • vendorf
      vendorf last edited by

      I'm wondering how to find which tabs are currently 'highlighted,' as when using shift+click or control+click on tabs to create a selection of multiple tabs.

      The Opera.Dev page has the following "Working With Tabs and Windows" page that explicitly lists 'highlighting' as one of the functionalities that is supported with the chrome.tabs API.

      Yet, when using chrome.tabs.query, every tab result always returns 'false' for the 'highlighted' field making it impossible to determine what the current selection is. I thought that perhaps this would be relegated to the 'selected' field instead, but 'selected' only ever appears 'true' for the currently active tab rather than all within the highlighted selection.

      Here is some example code:

      chrome.tabs.query({currentWindow: true}, function(tabs) {
           tabs.forEach(function(tab) {
                window.console.log('Tab ID: ' + tab.id + "\t Highlighted: " + tab.highlighted 
                     + "\t Selected: " + tab.selected);
                });
      });
      

      Regardless of selection, it always produces 'highlighted' as being false.

      Am I missing something, or is there some other way to go about finding the current highlighted selection?

      Thank you.

      Reply Quote 0
        1 Reply Last reply
      • Locked by  leocg leocg 
      • First post
        Last post

      Computer browsers

      • Opera for Windows
      • Opera for Mac
      • Opera for Linux
      • Opera beta version
      • Opera USB

      Mobile browsers

      • Opera for Android
      • Opera Mini
      • Opera Touch
      • Opera for basic phones

      • Add-ons
      • Opera account
      • Wallpapers
      • Opera Ads

      • Help & support
      • Opera blogs
      • Opera forums
      • Dev.Opera

      • Security
      • Privacy
      • Cookies Policy
      • EULA
      • Terms of Service

      • About Opera
      • Press info
      • Jobs
      • Investors
      • Become a partner
      • Contact us

      Follow Opera

      • Opera - Facebook
      • Opera - Twitter
      • Opera - YouTube
      • Opera - LinkedIn
      • Opera - Instagram

      © Opera Software 1995-