How can I open a sidebar link in the same tab?

228 Views Asked by At

Is there a way to open a link in a WebExtension sidebar to the currently active tab? I don't want to automatically open the link in a new tab. I'm talking about regular links:

<a href="https://www.example.com">Example</a>

Things I've tried:

  • Adding any target value to the a element does not seem to have the desired effect for any value.
  • Calling window.location.replace opens the link in the sidebar instead of the currently active tab.
  • Getting the current tab by using browser.tabs.query and setting tab.url for the sole result does nothing (even though I have added the tabs permission to manifest.json).

At this point, I'm kind of thinking this might not be possible. Is this the case?

0

There are 0 best solutions below