Re: [whatwg/webidl] Disallow non-attribute frozen arrays (PR #1413)

@annevk approved this pull request.



> +            undefined randomizeFavoriteColors();
+        };
+    </pre>
+
+    The behavior of these attributes could be defined like so:
+
+    <blockquote>
+        Each <code>PersonalPreferences</code> has associated <b>favorite colors</b>, a {{FrozenArray}}&lt;{{DOMString}}>, initially equal to the result of [=creating a frozen array=] from « "<code>purple</code>", "<code>aquamarine</code>" ».
+
+        Each <code>PersonalPreferences</code> has an associated <b>favorite foods</b>, a {{FrozenArray}}&lt;{{DOMString}}>, initially equal to the result of [=creating a frozen array=] from the empty list.
+
+        The <code>favoriteColors</code> [=getter steps=] are to return [=this=]'s favorite colors.
+
+        The <code>favoriteFoods</code> [=getter steps=] are to return [=this=]'s favorite foods.
+
+        The <code>favoriteFoods</code> [=setter steps=] are to set [=this=]'s favorite foods to [=the given value=].

This just works? So if it's not frozen it ends up throwing or some such?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1413#pullrequestreview-2142856503
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/webidl/pull/1413/review/2142856503@github.com>

Received on Wednesday, 26 June 2024 20:16:29 UTC