Re: [heycam/webidl] Integrate with the resizable buffers proposal (#982)

@domenic commented on this pull request.

LGTM with minor nits

> @@ -8940,6 +8968,10 @@ that unless the type is [=extended attributes associated with|associated with=]
         [=extended attributes associated with|associated with=] the [{{AllowShared}}]
         [=extended attribute=], and <a abstract-op>IsSharedArrayBuffer</a>(|V|) is true, then [=ECMAScript/throw=]
         a {{ECMAScript/TypeError}}.
+    1.  If the conversion is not to an IDL type
+        [=extended attributes associated with|associated with=] the [{{AllowResizable}}]
+        [=extended attribute=], and <a abstract-op>IsResizableArrayBuffer</a>(|V|) is false,

false -> true? Here and below?

> +creates a new IDL type that allows the buffer source type to be backed by an ECMAScript
+{{ECMAScript/ArrayBuffer}} that is resizable, instead of only by a fixed-length {{ECMAScript/ArrayBuffer}}.
+
+If the [{{AllowResizable}}] [=extended attribute=] and the [{{AllowShared}}] [=extended attribute=] both appear on one of the [=buffer source types=], it
+creates a new IDL type that allows the buffer source type to be additionally backed by an ECMAScript
+{{ECMAScript/SharedArrayBuffer}} that is growable.
+
+The [{{AllowResizable}}] extended attribute must [=takes no arguments|take no arguments=].
+
+A type that is not a [=buffer source type=] must not be
+[=extended attributes associated with|associated with=] the [{{AllowResizable}}] extended attribute.
+
+See the rules for converting ECMAScript values to IDL [=buffer source types=] in
+[[#es-buffer-source-types]] for the specific requirements that the use of [{{AllowResizable}}] entails.
+
+<div class="example">

Not sure how to split the responsibilities for examples between this and the [AllowShared] section. I'd say either:

- Include this mega-example in one of the two sections (I can see arguments for either), and make the other section link to the example.
- Have this section do no-xattr, [AllowResizable], and [AllowShared, AllowResizable]. Have the [AllowShared] section do no-xattr, [AllowShared], and [AllowShared, AllowResizable].

The first sounds a bit cleaner and less work, so I guess I favor 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/heycam/webidl/pull/982#pullrequestreview-663569228

Received on Wednesday, 19 May 2021 19:14:56 UTC