- From: Luke Warlow <notifications@github.com>
- Date: Tue, 12 Mar 2024 06:35:03 -0700
- To: whatwg/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/webidl/pull/1392/review/1931084499@github.com>
@lukewarlow commented on this pull request. > @@ -11092,8 +11141,16 @@ Note: The HTML Standard defines how a security check is performed. [[!HTML]] 1. If the argument at index |i| is declared with a [=optional argument/default value=], then append to |values| that default value. 1. Otherwise, append to |values| the special value “missing”. - 1. Otherwise, append to |values| the result of [=converted to an IDL value|converting=] - |V| to IDL type |type|. + 1. Otherwise: + 1. If |type| is an IDL type [=extended attribute associated with|associated with=] the + [{{StringContext}}] extended attribute, then set |V| to the result of performing + [=validate the string in context=], passing [=this=], |V|, the {{StringContext}} + extended attribute [=identifier=], and the [=identifier=] + of the [{{StringContext}}] extended attribute [=related construct=]. + + Note: That algorithm may [=JavaScript/throw=] a <l spec=ecmascript>{{TypeError}}</l>. + 1. Append to |values| the result of [=converted to an IDL value|converting=] + |V| to IDL type |type|. > I don't understand how this works. The overload resolution algorithm is an algorithm for finding the relevant operation, but somehow this assumes the relevant operation is already known because it's somehow magically tied to the StringContext attribute (despite nothing making it so). I don't fully understand what you mean by this? If the type has a StringContext we know it must be either a regular attribute or regular operation, so in this case a regular operation, which is the related construct here. Are you saying not to rely on related construct "magic"? As for implementation, WebKit doesn't fully correlate to these algorithms because of how it's code generator works, so I have the identifier context as a given. -- Reply to this email directly or view it on GitHub: https://github.com/whatwg/webidl/pull/1392#discussion_r1521477280 You are receiving this because you are subscribed to this thread. Message ID: <whatwg/webidl/pull/1392/review/1931084499@github.com>
Received on Tuesday, 12 March 2024 13:35:07 UTC