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

Define a PermissionStorage type for each permission to store data with. #73

Merged
merged 2 commits into from Apr 8, 2016

Conversation

jyasskin
Copy link
Member

https://rawgit.com/jyasskin/permissions/storage-type/index.html#idl-def-PermissionStorage

This is separate from the PermissionStatus that gets returned to users and from
the PermissionDescriptor that users query the permission with.

@@ -514,43 +523,66 @@
</dt>
</dl>
<p>
A <code>PermissionStatus</code> instance has an associated
<var>permission</var> that is a <a>PermissionDescriptor</a>.
<code>PermissionStatus</code> instances are created with the following
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious why it's useful to define this as an internal slot as opposed to just saying that it has an associated PermissionDescriptor? It seems a bit more confusing to me.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PermissionStatuses are going to have two internal slots once we get to #66, in case that makes it look a little better: https://rawgit.com/jyasskin/permissions/allow-choosers/index.html#idl-def-PermissionStatus.

I'm finding in Web Bluetooth that having a bunch of internal slots makes it easier to understand the purpose of each bit of associated data, and that foo@[[bar]] is simpler to type and link than "the bar associated with foo". The PermissionStatus slots are simple enough that I can eliminate them without needed a lot of extra wording, but I do somewhat prefer them.

@annevk and @domenic may also have opinions about which to use.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care strongly at the moment. Hopefully going forward IDL will provide formalism around this so you can define the layout of an object, including its internal slots, upfront.

jyasskin and others added 2 commits April 5, 2016 06:52
This is separate from the PermissionStatus that gets returned to users and from
the PermissionDescriptor that users query the permission with.
@jyasskin jyasskin merged commit 0af8292 into w3c:gh-pages Apr 8, 2016
@jyasskin jyasskin deleted the storage-type branch April 8, 2016 22:01
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.

None yet

3 participants