Closed Bug 1890706 Opened 5 months ago Closed 2 months ago

GeolocationCoordinates and GeolocationPosition should expose a Default .toJSON() method

Categories

(Core :: DOM: Geolocation, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
129 Branch
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.

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.

Component: Untriaged → JavaScript Engine
Product: Firefox → Core
Component: JavaScript Engine → DOM: Geolocation
Summary: GeolocationCoordinates should expose a Default .toJSON() method → GeolocationCoordinates and GeolocationPosition should expose a Default .toJSON() method

WE updated the spec proposal to add toJSON() on both GeolocationPosition and GeolocationCoordinates.

I 👍-ed the PR so I guess I should implement it 🙂

Assignee: nobody → krosylight

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.

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
Upstream PR was closed without merging
Flags: needinfo?(krosylight)
Depends on: 1902720
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
Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Upstream PR merged by moz-wptsync-bot

FF129 Docs work for this can be tracked in https://github.com/mdn/content/issues/34841

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: