Re: [w3c/permissions] Remove object-based permissions (#42)

@marcoscaceres sorry for the delay. See https://github.com/w3c/webrtc-pc/issues/275#issuecomment-134979978 for relevant WebIDL links and the discussion that follows, for why dictionaries are not polymorphic.

@jyasskin As written, [the WebIDL in the spec](https://w3c.github.io/permissions/#permissions-interface) is incorrect for all three methods. I think we need valid WebIDL here if we're going to have WebIDL at all, otherwise it is misleading.

Specifically: An implementation using a WebIDL compiler would not be able to - as the spec's normative prose dictates - "convert the underlying ECMAScript object to the permission descriptor type dictionary as described in [WEBIDL]", because the underlying ECMAScript object by definition is not available (*permissionDesc* is a secure copy of the base dictionary only), unless we were to do:

```js
[Exposed=(Window,Worker)]
interface Permissions {
  Promise<object> query(object permissionDesc);

  Promise<object> request(object permissionDesc);

  Promise<object> revoke(object permissionDesc);
};
```

or something like it (`object` has terrible security characteristics). The spec needs to be clear here.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/42#issuecomment-242634068

Received on Friday, 26 August 2016 05:31:04 UTC