Skip to content
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

Cross-browser support #45

Open
stlim0730 opened this issue Jul 22, 2016 · 5 comments
Open

Cross-browser support #45

stlim0730 opened this issue Jul 22, 2016 · 5 comments

Comments

@stlim0730
Copy link
Owner

stlim0730 commented Jul 22, 2016

I was trying to test some on-map interactivity features on Safari, to make sure nothing is Chrome-dependent. Safari failed to properly load the map.

Need to find out the reason and solution.

@stlim0730
Copy link
Owner Author

I found one of the potential reasons. I prefer let expression to var for variable assignment in Javascript because let has more specific local scope. However, Safari doesn't officially support the MDN standard regarding let expression (MDN let statement).

When I mechanically replaced all the let in my Javascript code with var, both Chrome and Safari failed to load the map correctly. The replacement might require more careful attention.

Currently, the only web browser we can confirm to be supported is Chrome.

@calo1
Copy link
Collaborator

calo1 commented Jul 22, 2016

If this persists .. lets add that to the readme to keep track

@brianashpugh
Copy link
Collaborator

I just did a quick browser check on the most recent versions of Safari and Firefox. Safari loaded the map correctly, but Firefox did not. There are some javascript errors in the console so it may be a quick fix.

We should consider a more serious browser compatibility audit too since Farmview users are more likely than average to be on outdated software.

@brianashpugh
Copy link
Collaborator

The Firefox issue is on this line:

let values = val.split(' ');

so almost definitely still the 'let' incompatibility. But I realized I was on a very old version of FF, and updating fixed the issue. We should still consider moving from 'let' to 'var' to support old FF and Safari versions.

@stlim0730
Copy link
Owner Author

stlim0730 commented Apr 12, 2018

I disagree that we should move from let to var declaration.
They have different behaviors or side effects where let gives us more specific scope of the declaration.
let is one of features in newer standard. I think Farmview should be more future-proof, rather than backward-compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants