I want to overload navigator.geolocation.getCurrentPosition and navigator.geolocation.watchPosition to simulate geolocation during
development. Is it possible to do it using Google Chrome extension?
I want to overload navigator.geolocation.getCurrentPosition and navigator.geolocation.watchPosition to simulate geolocation during development. Is it
Share
You mean something like this?
If it is just for your own needs then it would be much easier to just do it in your js code.
If you want to make extension out of it then:
<script>tag, otherwise you will be inside content script sandbox and your overwritten function will not be visible to the parent page.