w3c / geolocation

W3C Geolocation API
https://www.w3.org/TR/geolocation/
81 stars 56 forks source link

Default errorCallback to null #62

Closed marcoscaceres closed 3 years ago

marcoscaceres commented 3 years ago

Closes #61

The following tasks have been completed:

Implementation commitment:


Preview | Diff

marcoscaceres commented 3 years ago

@cdumez, I've changed the IDL to match what Gecko has (which, IIUC, should match the desired behavior). However, you might need to update WebKit to default errorCallback = null.

https://github.com/WebKit/WebKit/blob/main/Source/WebCore/Modules/geolocation/Geolocation.idl

marcoscaceres commented 3 years ago

Thanks for the review, @reillyeon!

marcoscaceres commented 3 years ago

Just noting that WebKit's IDL parser doesn't support = null or = {} yet.

cdumez commented 3 years ago

Just noting that WebKit's IDL parser doesn't support = null or = {} yet.

Does it really matter? Our behavior is correct here. Our idl generator assumes null is the default value for optional nullable parameters.

marcoscaceres commented 3 years ago

Does it really matter? Our behavior is correct here. Our idl generator assumes null is the default value for optional nullable parameters.

No, it doesn't matter :) Just wanted a record of it in case anyone goes looking as to why the IDL in WebKit doesn't exactly match the spec is all (or tries to compile with the updated IDL, as I did).