-
Notifications
You must be signed in to change notification settings - Fork 8
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
Bikeshed: Document Policy terminology #26
Comments
This change updates a number of definitions in the document policy spec, replacing the term "feature" in many places with the maybe-still-too-vague "configuration point", clarifies that 'values' are part of a policy configuration, while 'default values', 'ranges' and 'types' are part of the definition of a configuration point, and more clearly shows that 'directives' are part of the structured-header serialization, rather than being part of the 'policy' concept. Starts addressing #369
Should it also be named "Configuration Policy" as presumably we also want this for workers, not just documents? |
Naaaaaaames. Ugh. With the caveat that we should just land on something and run with it quickly (since I think Chrome is already shipping this to allow control over text snippet navigation? Is that right, Ian?) "Configuration Policy" is somewhat repetitive, because the policy is a configuration, and too generic, since permissions policy seems like it's also "configuring" in some relevant sense. " "Feature Policy" seems accurate, but would be... confusing. "Policy That Affects a Single Global" is also verbose. Idunno. "Global Policy" is the best of my bad ideas at the moment, but it's terrible because no one would recognize "Global" as being a thing and not everything. "Global Object Policy" isn't any better (because it can just as easily be a global object-policy). /cc @camillelamy who I think also has thoughts here. |
Would "Context Policy" cover both documents and workers? Since it configures the context in which things will execute. "WindowOrWorkerGlobalScope mixin Policy" while accurate is definitely too long :). |
My main worry is that "Context" is somewhat overloaded, but that might also make it okay. "Environment" might be another term we could repurpose. cc @domenic |
"Environment" isn't bad... do environment settings objects span realms? That is, could we have more than one environment in a given document/worker? If not, it's a pretty reasonable match from a textual perspective. |
They're 1:1 with realms and 1:1 with globals. If JavaScript gains constructable realms that would probably no longer be the case, but I think that matches what we'd want for this (in that a realm and a realm constructed in that realm would share the environment). |
I've been looking at this lately, and wonder if there's been any progress with the naming? Is More proposals:
|
I'd really rather not rename the whole spec, and Chrome at least has already shipped the |
It's not clear to me how that name works given workers. |
@clelland can you clarify whether that's Google's position? I guess one alternative here would be that we keep calling it document policy, but for workers we call it worker policy, and for worklets worklet policy. And they each get their own header. |
So, feature is a heavily overloaded term, and I'd at least like to not make it unnecessarily worse -- as I've been moving "features" from Feature Policy to Document Policy, I've realized that a number of them are not "features" in any real sense, they're more like changeable defaults, or configurable behaviours.
I'm proposing the term "configuration point" to describe what has previously been a "feature" in document policy -- examples in development right now would be:
In this world, specs integrating with document policy would define configuration points. A policy would be a mapping of configuration points to policy values. Configuration points have a type (int, bool, float, enum, etc) and a range, which would be a subset of all values expressible by that type, and the policy values would be elements of that range.
Opinions welcomed :)
The text was updated successfully, but these errors were encountered: