diff --git a/README.md b/README.md index e71258b..fca8dea 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ interface PreferenceManager { interface PreferenceObject { // null means the preference is not overridden readonly override: string | null; + readonly value: string; readonly validValues: string[]; requestOverride(value: string | null): Promise; diff --git a/index.bs b/index.bs index adb890d..7deb44a 100644 --- a/index.bs +++ b/index.bs @@ -184,6 +184,7 @@ If an override is set for this preference: [Exposed=Window, SecureContext] interface PreferenceObject { readonly attribute DOMString? override; + readonly attribute DOMString value; readonly attribute FrozenArray validValues; undefined clearOverride(); @@ -202,6 +203,18 @@ interface PreferenceObject { 1. Return |override|. +### {{value}} attribute ### {#value-attribute} + +
+ The value attribute, when accessed, must run these steps: + + 1. Let |preference| be the preference object's name. + 1. Let |value| be null. + 1. If an override for |preference| exists, set |value| to the value of that override. + 1. If |value| is null, set |value| to the UA value of the preference. + 1. Return |value|. +
+ ### {{validValues}} attribute ### {#validValues-attribute}