-1

I just started with making a firefox (web)extension / addon. It is pretty awesome. But cannot really find it how to go to an url in the active tab. When I do document.open('https://www.github.com','', 'noopener=true'); it will open a new popup. But it would be nice to go another link in the same tab.

Thanks :),

Daan

Daansk44
  • 497
  • 2
  • 4
  • 21
  • maybe `location.href` it is what are you looking for? https://stackoverflow.com/questions/7077770/window-location-href-and-window-open-methods-in-javascript – artanik Feb 20 '20 at 19:41
  • Are you trying to do this from a content script or a script in the background context? Are you doing it from a popup? What permissions have you defined? – Makyen Feb 21 '20 at 01:26

1 Answers1

0

Not the active tab but anyway :)

document.location.href = "https://www.gitlab.com";

Daansk44
  • 497
  • 2
  • 4
  • 21