w3c / permissions

Permissions API
https://www.w3.org/TR/permissions/
Other
107 stars 51 forks source link

Turn PermissionSetParameters.descriptor into an object #443

Closed saschanaz closed 7 months ago

saschanaz commented 7 months ago

The Set Permission step 3 does: https://w3c.github.io/permissions/#webdriver-command-set-permission

  1. Let rootDesc be parameters.descriptor.

But parameters is a JS object here, so it can't just access the IDL property but should do some JS Get(), as Streams does in https://streams.spec.whatwg.org/#abstract-opdef-setupcrossrealmtransformreadable.

But an even better way to fix it is just to turn decriptor as an object, which would allow Let rootDesc be parametersDict.descriptor.

(Step 4 does the same thing for rootDesc.name when rootDesc is a JS object, maybe it can be "permission descriptor type per the result of Get(rootDesc, "name")"