Skip to content
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

feat(algorithms): allow calling with a PermissionName #115

Merged
merged 1 commit into from
Aug 5, 2016

Conversation

jyasskin
Copy link
Member

Instead of forcing specs for simple permissions to write out a permission
descriptor. This partially fixes @annevk's objection that writing {name: "persistent-storage"} in a spec doesn't formally create a WebIDL dictionary instance, although we'll still need to formalize syntax like that for more complicated descriptors.

Preview at https://api.csswg.org/bikeshed/?url=https://raw.githubusercontent.com/jyasskin/permissions/permission-name-shorthand/index.bs#reading-current-states. I'm not sure the best place to define this. I want folks who click the link to, say, https://api.csswg.org/bikeshed/?url=https://raw.githubusercontent.com/jyasskin/permissions/permission-name-shorthand/index.bs#request-permission-to-use to find the definitions of the shorthands (so a separate "shorthands" section is out), and I don't want to make every spec write out <a for="PermissionName">request permission to use</a> to disambiguate the two definitions (so direct links to the shorthand are out). The wording doesn't fit well right next to the main definition, so I put it below.

Instead of forcing specs for simple permissions to write out a permission
descriptor.
@marcoscaceres
Copy link
Member

LGTM, but maybe we wait for @annevk to give an ok before merging.

@annevk
Copy link
Member

annevk commented Aug 4, 2016

This looks okay, but doesn't really resolve the problem. It just hides it a bit more. The fact that you're using ECMAScript and IDL concepts in a place where ECMAScript and IDL are not processed (or defined to be processed) is what is problematic.

@jyasskin
Copy link
Member Author

jyasskin commented Aug 4, 2016

"a PermissionDescriptor with its name member set to name." seems no worse than any other time we create a WebIDL thing from prose, and is fairly close to the wording in http://heycam.github.io/webidl/#es-dictionary. Or have I missed a subtlety?

I agree that this change doesn't fix the problem of Web Bluetooth creating a descriptor in step 3 of request Bluetooth devices. I've filed whatwg/webidl#142 to try to get a good syntax for that use.

@annevk
Copy link
Member

annevk commented Aug 5, 2016

Ah okay, if you drop the syntax it is a lot better, yes.

@jyasskin jyasskin merged commit b0bbb63 into w3c:master Aug 5, 2016
@jyasskin jyasskin deleted the permission-name-shorthand branch August 5, 2016 17:51
jyasskin added a commit to jyasskin/storage that referenced this pull request Aug 5, 2016
jyasskin added a commit to jyasskin/storage that referenced this pull request Oct 5, 2016
jyasskin added a commit to jyasskin/storage that referenced this pull request Oct 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants