- From: Timothy Gu <notifications@github.com>
- Date: Wed, 22 Feb 2023 10:22:37 -0800
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/webidl/pull/1270/review/1309884309@github.com>
@TimothyGu commented on this pull request.
> @@ -6936,8 +6869,8 @@ in ECMAScript, as defined by the <cite>ECMAScript Language Specification</cite>
[[!ECMA-262]].
Unless otherwise specified, objects defined in this section are ordinary objects as described in
-[=ECMA-262 Ordinary object internal methods and internal slots=], and if the
-object is a [=function object=], [=ECMA-262 Built-in function objects=].
+[[ecmascript#sec-ordinary-object-internal-methods-and-internal-slots]], and if the
+object is a [=function object=], [[ecmascript#sec-built-in-function-objects]].
This is wonderful. Thanks!
> @@ -7655,7 +7587,7 @@ values are represented by ECMAScript Object values.
An ECMAScript value |V| is [=converted to an IDL value|converted=]
to an IDL {{object}} value by running the following algorithm:
- 1. If <a abstract-op>Type</a>(|V|) is not Object, then [=ECMAScript/throw=] a {{ECMAScript/TypeError}}.
+ 1. If <a abstract-op>Type</a>(|V|) is not Object, then [=ECMAScript/throw=] a {{TypeError}}.
This is another name clash between ES and Web IDL. Previously it linked to ECMAScript, but now it goes to Web IDL. It's mostly fine since Web IDL's `{{TypeError}}` is basically a redirect to ES. But since these algorithm steps are written in the style of ECMAScript (including the `throw` reference), I'd still prefer to use the ECMAScript link if possible.
> Note: Don't confuse the "{{SyntaxError!!exception}}" {{DOMException}} defined here
-with ECMAScript's {{ECMAScript/SyntaxError}}.
+with ECMAScript's {{SyntaxError}}.
"{{SyntaxError!!exception}}" {{DOMException}} is used to report parsing errors in web APIs,
for example when parsing selectors,
-while the ECMAScript {{ECMAScript/SyntaxError}} is reserved for the ECMAScript parser.
+while the ECMAScript {{SyntaxError}} is reserved for the ECMAScript parser.
To help disambiguate this further,
always favor the "{{SyntaxError!!exception}}" {{DOMException}} notation
over just using {{SyntaxError!!exception}} to refer to the {{DOMException}}. [[DOM]]
The new `{{SyntaxError}}` references are incorrect: it goes to the unrelated `"SyntaxError"` `DOMException` in Web IDL rather than ES. In fact, this paragraph explains exactly how they are different.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/webidl/pull/1270#pullrequestreview-1309884309
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/webidl/pull/1270/review/1309884309@github.com>
Received on Wednesday, 22 February 2023 18:22:49 UTC