BlazorMobile icon indicating copy to clipboard operation
BlazorMobile copied to clipboard

window.history.go / back fire OnNavigating handler on Android

Open Daddoon opened this issue 4 years ago • 2 comments

window.history.go / back, fire OnNavigating handler on Android .

This is related on how Webextension works with the onbeforerequestevent.

Daddoon avatar Mar 06 '20 22:03 Daddoon

Same issue here related : https://github.com/piroor/newtabfromlocationbar/issues/18#issuecomment-347074234

Daddoon avatar Mar 06 '20 22:03 Daddoon

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.

Daddoon avatar Mar 06 '20 23:03 Daddoon