-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SyntaxError #2
Comments
Hi @Impossiblue - thanks for raising this. We can't replicate it on our end - what version of Safari are you using? We found this stackoverflow thread - seems like it could be an issue when the code selects an HTML element where the id matches the variable name. So one idea would be to change the If that doesn't work, can you share more details like your OS version, Safari version etc and we can see if we can help resolve? |
John IV,
Thank you for getting back to me.
My initial tests were carried out in Safari 10.1.2 on OS X Yosemite 10.10.5. (Yes, this is a geriatric combination.)
Following your suggestion, I renamed the 'div' in HTML and did likewise in CSS and 'tutorial.js'. The problem evaporated.
So, StackOverflow narrowing the problem down to Safari, seems to be correct. At least for older versions of the browser, because: I also tested in Safari 14.0.3 on macOS Mojave 10.14.6 WITHOUT modifications, and the error message did NOT show up.
Somewhere between Safari 10 and 14, Apple seems to have fixed the issue.
I guess it is time for me to finally leave the old 2010 PowerMac/Yosemite workhorse specifically for the few programmes I still need but will not upgrade. Oh, well.
Yours sincerely,
Bjorn
Norway
On April 1, 2021 at 6:47 AM, John IV ***@***.***> wrote:
Hi @Impossiblue - thanks for raising this. We can't replicate it on our end - what version of Safari are you using?
We found this stackoverflow thread - seems like it could be an issue when the code selects an HTML element where the id matches the variable name.
So one idea would be to change the <div id="map"> element to another id in index.html, and the corresponding string on line 12 in tutorial.js. We just pushed a branch with these adjustments, try this out: 4882811
If that doesn't work, can you share more details like your OS version, Safari version etc and we can see if we can help resolve?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Great, thanks Bjorn! Glad to hear the workaround was successful. I'm going to close this issue - if you have any more problems feel free to open a new one!! |
When I run the Scroll Story 'index.html' file (Path: os-data-hub-tutorials-master > web-development > scroll-story > code > index.html) I get an error message in Safari.
Quote start:
SyntaxError: Can't create duplicate variable that shadows a global property: 'map'
(anonymous function)
Quote end.
The only modification I did was to add my API key in 'tutorial.js'.
The text was updated successfully, but these errors were encountered: