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

[Solved]I need WindowId for Sidebar in Opera 29

  • I can't find a way to get WindowId or where Sidebar residues.
    I can get it easily from or from tabs.query, when sidebar is launched in active window, but issue starts when browser is closed from menu with multiple windows and started with Sidebar open.
    My extension gets confused at this point, because all sidebars add tabs from current window.
    Oh and one more thing, opr.sidebarAction.onClicked.addListener does not work, I get "Cannot read property 'addListener' of undefined".

  • Bump, I see update to Opera 31, but no updates in API documentation.
    I see ExtensionSidebarTest.SidebarVisibilityInMultipleWindows in blog post, but will it give me window.ids ?

    Oh and one more thing, I see now that opera:// internal pages are now browser://, but I doubt it was intentional.

  • Yeah, I see the internal pages as browser:// too. opera:// was much better in my opinion.

  • I completely forgot about this thread. This is not needed anymore because since opera version 32, when I call from a sidebar, it finally gives me current windowId instead of Id from active window. I always wondered why it always gave me the wrong Id, that's why i asked for this feature from sidebar's API, but it must have been a bug.
    So it's solved and thread can be closed 🙂