Re: [w3ctag/design-reviews] Feature Policy JS introspection API (#292)

During the F2F, @cynthia and me looked at this issue. Apologies for the long wait, but we are in the process of speeding up our reviews.

We find the method names somewhat inconsistent. There are two getters, one starts with `get` - the other doesn't. There is a query method that is not clear that it is a query method from the name.

`allowedFeatures()` should maybe take an optional origin like the query method.

We have existing similar names on the web today like `document.querySelector()` and `document.getElementsByTag()`. Better names could be `policy.queryAllowList()` and `policy.getAllowList(optional origin)` and `policy.getAllowedOrigins(feature)` - in particular we find the term "allow list" being two different things (features, origins) called the same thing confusing (hence `getAllowlistForFeature` returns a list of origins and not an actual allow list).

Given these inconsistencies, how malleable are the APIs at the moment since it is a shipped feature? If the adoption rate isnĀ“t high, considering that other browsers have not shipped we think it might not be too late to make adjustments to the naming.

At this F2F we are hearing that feature policy will get feature policies that support parameters - what is the interopt story for that?


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/292#issuecomment-494821607

Received on Wednesday, 22 May 2019 14:15:39 UTC