Re: [whatwg/webidl] WIP: switching maplike/setlike to use infra maps and sets (PR #1138)

@domenic commented on this pull request.



> @@ -11422,6 +11420,32 @@ and its value is an object called a <dfn id="dfn-legacy-factory-function" export
 which allows creation of objects that implement the interface.
 The characteristics of a legacy factory function are described in [[#legacy-factory-functions]].
 
+<div algorithm>
+    Some interface operations are defined directly over ECMAScript values,
+    rather than IDL or other spec-internal types.
+    These algorithms need to perform an [=implementation check=]
+    as their opening steps,
+    to ensure they're being called on the correct kind of object
+    and that the operation is valid to call from the given script.
+
+    To <dfn local-lt="implementation check|implementation-check">implementation-check an object</dfn> |esValue|
+    against the interface |interface|,
+    with the identifier |name|
+    and the type |type|:
+
+    1. Let |object| to [=?=] [$ToObject$](|esValue|).
+    1. If |object| is a [=platform object=],

> One of these "ECMAScript object"s are meant to be "IDL object", right? Otherwise I don't know what you're saying.

Yes, the latter.

So you're right that "implements" is used on interfaces. "is a platform object" is more ambiguous, but I guess you're right there too, looking at usages.

> I hadn't found how to properly invoke the notion of the IDL value it's paired to.

Usually we just convert the ES value to an IDL object. The verbiage in that algorithm is similar: https://whatpr.org/webidl/1138.html#es-interface

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

Message ID: <whatwg/webidl/pull/1138/review/962359799@github.com>

Received on Wednesday, 4 May 2022 19:09:07 UTC