Skip to content

Commit 331a76a

Browse files
committed
Copy String context handling to js overload resolution algorithm
1 parent 550b967 commit 331a76a

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

index.bs

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11151,8 +11151,15 @@ Note: The HTML Standard defines how the validation is performed. [[!HTML]]
1115111151
1. If the argument at index |i| is declared with a [=optional argument/default value=],
1115211152
then append to |values| that default value.
1115311153
1. Otherwise, append to |values| the special value “missing”.
11154-
1. Otherwise, append to |values| the result of [=converted to an IDL value|converting=]
11155-
|V| to IDL type |type|.
11154+
1. Otherwise:
11155+
1. If |type| is an IDL type [=extended attribute associated with|associated with=] the
11156+
[{{StringContext}}] extended attribute, then set |V| to the result of [=validate the string in context=], passing
11157+
[=this=], |V|, the {{StringContext}} extended attribute [=identifier=], and the [=identifier=]
11158+
of the [{{StringContext}}] extended attribute [=related construct=].
11159+
11160+
Note: That algorithm may [=JavaScript/throw=] a <l spec=ecmascript>{{TypeError}}</l>.
11161+
1. Append to |values| the result of [=converted to an IDL value|converting=]
11162+
|V| to IDL type |type|.
1115611163
1. Set |i| to |i| + 1.
1115711164
1. If |i| = |d|, then:
1115811165
1. Let |V| be |args|[|i|].
@@ -11351,8 +11358,15 @@ Note: The HTML Standard defines how the validation is performed. [[!HTML]]
1135111358
1. If the argument at index |i| is declared with a [=optional argument/default value=],
1135211359
then append to |values| that default value.
1135311360
1. Otherwise, append to |values| the special value “missing”.
11354-
1. Otherwise, append to |values| the result of
11355-
[=converted to an IDL value|converting=] |V| to IDL type |type|.
11361+
1. Otherwise:
11362+
1. If |type| is an IDL type [=extended attribute associated with|associated with=] the
11363+
[{{StringContext}}] extended attribute, then set |V| to the result of [=validate the string in context=], passing
11364+
[=this=], |V|, the {{StringContext}} extended attribute [=identifier=], and the [=identifier=]
11365+
of the [{{StringContext}}] extended attribute [=related construct=].
11366+
11367+
Note: That algorithm may [=JavaScript/throw=] a <l spec=ecmascript>{{TypeError}}</l>.
11368+
1. Append to |values| the result of [=converted to an IDL value|converting=]
11369+
|V| to IDL type |type|.
1135611370
1. Set |i| to |i| + 1.
1135711371
1. While |i| is less than the number of arguments |callable| is declared to take:
1135811372
1. If |callable|'s argument at index |i| is declared with a [=optional argument/default value=],

0 commit comments

Comments
 (0)