An error occurred while processing the error: browser location Geolocation example problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

An error occurred while processing the error: browser location Geolocation example problem

I've written some code here: https://code.sololearn.com/W6Br9j8IynIu/#html However, it's a) returning the geolocation as the sololearn URL b) instantiating a sandbox within a sandbox (with infinite recursion on Firefox) and c) intermittently generating this error: https://imgur.com/a/q1nAS Can anyone tell me why this code is generating an error and for bonus points why it's generating an error while attempting to generate an error page?

18th Mar 2018, 12:15 PM
Peter David Carter
Peter David Carter - avatar
1 Answer
+ 3
Global variable in a JS script are set as property of the 'window' object... wich have already a 'location' property, used to redirect the page to a new url when assigning it: try to use another variable name instead (or declare your variable in another scope than the global one).
18th Mar 2018, 12:25 PM
visph
visph - avatar