Re: [w3c/permissions] Introduce "Automation" section (#151)

raymeskhoury commented on this pull request.



> +      <code>|rootDesc|.{{PermissionDescriptor/name}}</code> isn't <a>allowed in
+      non-secure contexts</a>, return <a>error</a> with <a>error code</a>
+      <a>invalid argument</a>.</li>
+      <li>Let |state| by the result of <a>getting the property</a> "`state`"
+      from the |parameters| argument.</li>
+      <li>If |state| is neither "`granted`", "`prompt`", nor "`denied`", return
+      <a>error</a> with <a>error code</a> <a>invalid argument</a>.</li>
+      <li>Let |allRealms| be the result of <a>getting the property</a>
+      "`allRealms`" from the |parameters| argument.</a></li>
+      <li>If |allRealms| is `undefined`, let |allRealms| be false.</li>
+      <li>If |allRealms| is neither true nor false, return <a>error</a> with
+      <a>error code</a> <a>invalid argument</a>.</li>
+      <li>Interpret the value of |state| as <a>new information about the user's
+      intent</a>. If |allRealms| is true, this information applies to other
+      <a>realms</a> with the <a>same origin</a>.
+      <li>Return <a>success</a> with data `null`.</li>

I think completeness is a good thing too. You're right, I guess it's probably going to be ok for most tests if we don't fully implement the API and default to setting the permission for all realms even when that value is not true. The other option to consider would be making allRealms the default for the API which would encourage test writers to only specify to use an individual realm when it makes sense.

-- 
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/pull/151#discussion_r125808809

Received on Thursday, 6 July 2017 04:23:10 UTC