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
Passing base dictionary wont work. #59
Comments
…rface. This also starts enforcing that revoke() is passed a descriptor of the right type. Fixes w3c#59.
In #42 (comment) @jyasskin wrote:
Gecko implements some APIs in JavaScript. We have a DOM membrane (compartments), but WebIDL bindings provide another layer of security by formalizing access, so mistakes are not made interrogating inputs in ways which could cause unintended side-effects.
As the prose in this spec is currently written, we can't implement it in JavaScript, which would be unusual. We'd need new support methods specifically to interrogate objects and convert them to safe dictionaries (which is doable, just more work). Security aside, I think there's also a prevailing view that WebIDL was designed around facilitating good API design only, and conversely that something requiring prose and not fitting in could be a symptom of bad API design. This is a hygiene argument, though it fits my personal disdain for lateral APIs (though I sympathize with |
I think #125 handles the above security concerns by saying to convert the |
Another way to implement these functions is to treat their parameter types as a union of all descriptor types. I'm not doing it that way in the spec because I want to have to update as little as possible in this spec when another spec wants to define a new powerful feature. |
Tried that. Union members must be distinguishable, so there cannot be two dictionaries in a union. |
Same thing as happened in
getStats
, a WebIDL method taking a basePermissionDescriptor
dictionary wont see any members from derived dictionaries, e.g.deviceId
fromDevicePermissionDescriptor
, so this API needs to takeobject
, interfaces, or be rethought.Also #42 may be related.
The text was updated successfully, but these errors were encountered: