BlazorMobile
BlazorMobile copied to clipboard
window.history.go / back fire OnNavigating handler on Android
window.history.go / back, fire OnNavigating handler on Android .
This is related on how Webextension works with the onbeforerequestevent.
Same issue here related : https://github.com/piroor/newtabfromlocationbar/issues/18#issuecomment-347074234
Some documentation : https://stackoverflow.com/questions/45139926/how-to-check-if-a-tab-has-been-reloaded-in-background-js
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts
As we can’t enforce some behavior between the webnavigation api and webrequest api, one solution is to inject a content_script that wrap the window.history API, and notify the background worker that the next request is coming from the history from JavaScript, and that the request can be executed without check.