From d8d0a15abc0be253c6cfe29c34930f2bdc48bc41 Mon Sep 17 00:00:00 2001 From: Naina Raisinghani Date: Thu, 3 Aug 2017 17:55:03 +0200 Subject: [PATCH 1/3] Add description for StylePropertyMapReadOnly.get() --- css-typed-om/Overview.bs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/css-typed-om/Overview.bs b/css-typed-om/Overview.bs index 429bd190..74785773 100644 --- a/css-typed-om/Overview.bs +++ b/css-typed-om/Overview.bs @@ -275,8 +275,19 @@ The append(DOMString property,
To get a value from a StylePropertyMap, run these steps: - Issue(148): Write this + 1. If |property| does not start with two dashes (U+002D HYPHEN), + let |property| be |property| [=ASCII lowercased=]. + + 2. If |property| is not a [=supported property name=], + [=throw=] a {{TypeError}} and exit this algorithm. + 3. If |property| is not a [=list-valued property=], + [=throw=] a {{TypeError}} and exit this algorithm. + + 4. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|, + return that entry. + + 5. Else, return `null`.
From 9bf6a106f2d27608419382d37e86026bd1d3649a Mon Sep 17 00:00:00 2001 From: Naina Raisinghani Date: Fri, 4 Aug 2017 09:28:16 +0200 Subject: [PATCH 2/3] Ensure that the get() function works for list-valued and non-list-valued properties --- css-typed-om/Overview.bs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/css-typed-om/Overview.bs b/css-typed-om/Overview.bs index 74785773..8bea8872 100644 --- a/css-typed-om/Overview.bs +++ b/css-typed-om/Overview.bs @@ -281,13 +281,10 @@ The append(DOMString property, 2. If |property| is not a [=supported property name=], [=throw=] a {{TypeError}} and exit this algorithm. - 3. If |property| is not a [=list-valued property=], - [=throw=] a {{TypeError}} and exit this algorithm. - - 4. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|, + 3. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|, return that entry. - 5. Else, return `null`. + 4. Else, return `null`.
From c527156a337ae91baf8057cdb276dfffd51cbe2b Mon Sep 17 00:00:00 2001 From: Naina Raisinghani Date: Fri, 18 Aug 2017 14:48:58 -0700 Subject: [PATCH 3/3] Only return the first entry in a list of values for each property --- css-typed-om/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css-typed-om/Overview.bs b/css-typed-om/Overview.bs index 0c567447..f8e71816 100644 --- a/css-typed-om/Overview.bs +++ b/css-typed-om/Overview.bs @@ -282,7 +282,7 @@ The append(DOMString property, [=throw=] a {{TypeError}} and exit this algorithm. 3. If {{StylePropertyMap}}’s [=property model=] contains an entry for |property|, - return that entry. + return the first value found in that entry. 4. Else, return `null`.