GeolocationCoordinates and GeolocationPosition should expose a Default .toJSON() method
Categories
(Core :: DOM: Geolocation, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox129 | --- | fixed |
People
(Reporter: marcos, Assigned: saschanaz)
References
Details
(Keywords: dev-doc-complete, parity-chrome, parity-safari)
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Steps to reproduce:
Check the GeolcationCoordinate prototype for a .toJSON() method.
Actual results:
There is no such method.
Expected results:
When a position object is successfully acquired, it should be possible to call .toJSON() on its .coords
attribute.
This is spec change proposal:
https://github.com/w3c/geolocation-api/pull/147
Comment 2•5 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Updated•5 months ago
|
WE updated the spec proposal to add toJSON() on both GeolocationPosition and GeolocationCoordinates.
Comment 4•3 months ago
|
||
Chrome and Safari now support this, as of this WebKit commit: https://github.com/WebKit/WebKit/commit/0160ba82ea224867551f48009bf73f578536c27d
Assignee | ||
Comment 5•3 months ago
•
|
||
I 👍-ed the PR so I guess I should implement it 🙂
That's the spirit! 🥰 Looking forward to feature parity on this.
On a more serious note, this will be hugely helpful to getting the spec back to REC, so will track this for when it's done.
Comment 7•2 months ago
|
||
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6d97cf89b399 Implement default toJSON for GeolocationCoordinates and GeolocationPosition and add a web platform test; r=saschanaz,webidl,smaug https://hg.mozilla.org/integration/autoland/rev/334970d67bba 1902720: apply code formatting via Lando
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/46773 for changes under testing/web-platform/tests
Comment 10•2 months ago
|
||
Backed out for causing wpt failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/ae7a50367303bcdbabd20edbf8d7113a8abc04c2
Upstream PR was closed without merging
Assignee | ||
Updated•2 months ago
|
Comment 12•2 months ago
|
||
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b073db6e420b Implement default toJSON for GeolocationCoordinates and GeolocationPosition and add a web platform test; r=saschanaz,webidl,smaug
Comment 13•2 months ago
|
||
bugherder |
Upstream PR merged by moz-wptsync-bot
Comment 15•1 month ago
|
||
FF129 Docs work for this can be tracked in https://github.com/mdn/content/issues/34841
Description
•