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

Harmonize error code for watchPosition() #95

Closed
marcoscaceres opened this issue Jul 26, 2021 · 3 comments · Fixed by #100
Closed

Harmonize error code for watchPosition() #95

marcoscaceres opened this issue Jul 26, 2021 · 3 comments · Fixed by #100

Comments

@marcoscaceres
Copy link
Member

Speaking with @saschanaz, they suggested we could harmonize all engines to just return 0 when whatPosition() would results in an error. This change would only affect Firefox, as Chrome and Safari already return 0, but the spec could be updated to reflect this.

@marcoscaceres marcoscaceres changed the title Harmonize error code for whatPosition() Harmonize error code for watchPosition() Jul 26, 2021
@marcoscaceres
Copy link
Member Author

Gave this some thought... I think we should just fix Gecko and leave the spec be.

@marcoscaceres
Copy link
Member Author

Reopening the issue after some further discussion with @saschanaz and @annevk.

@marcoscaceres marcoscaceres reopened this Jul 29, 2021
@marcoscaceres
Copy link
Member Author

marcoscaceres commented Jul 29, 2021

The argument presented is that web developers could come to rely on 0 being returned synchronously, so we might as well standardize that.

However, I'd argue that we should only ever return 0 going forward for any/all error and continue to push developers to check the GeolocationPositionError.code to figure out what actually went wrong.

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

Successfully merging a pull request may close this issue.

1 participant