Do WebExtensions have a way to check whether it's possible to go back/forward in history (and actually go back/forward)? I looked at history
and webNavigation
APIs, but it doesn't seem obvious from that.
Asked
Active
Viewed 177 times
0

Alexey Romanov
- 167,066
- 35
- 309
- 487
-
webNavigation API doesn't track DOM History because it belongs to the web page DOM which is different from the background page. Only content scripts can do that using the native DOM History API. – wOxxOm Feb 24 '18 at 20:25
-
I actually want to do it from a content script. And https://stackoverflow.com/questions/3588315/how-to-check-if-the-user-can-go-back-in-browser-history-or-not answers the other part of my question. – Alexey Romanov Feb 24 '18 at 20:58