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•6 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•6 months ago
|
WE updated the spec proposal to add toJSON() on both GeolocationPosition and GeolocationCoordinates.
Comment 4•4 months ago
|
||
Chrome and Safari now support this, as of this WebKit commit: https://github.com/WebKit/WebKit/commit/0160ba82ea224867551f48009bf73f578536c27d
Assignee | ||
Comment 5•4 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•4 months ago
|
||
Comment 10•4 months ago
|
||
Backed out for causing wpt failures
Backout link: https://hg.mozilla.org/integration/autoland/rev/ae7a50367303bcdbabd20edbf8d7113a8abc04c2
Assignee | ||
Updated•4 months ago
|
Comment 12•4 months ago
|
||
Comment 13•4 months ago
|
||
bugherder |
Comment 15•3 months ago
|
||
FF129 Docs work for this can be tracked in https://github.com/mdn/content/issues/34841
Description
•