Skip to content

Commit 9e514c9

Browse files
clellandMs2ger
authored andcommitted
Remove use of [Constructor] extended attribute
This removes [Constructor] from DOMException and from examples, replacing it as necessary with constructor operations.
1 parent db74ef4 commit 9e514c9

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

index.bs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2910,8 +2910,9 @@ a [=static attribute=].
29102910
<code class="idl">name</code> attribute:
29112911

29122912
<pre highlight="webidl">
2913-
[Exposed=Window, Constructor]
2913+
[Exposed=Window]
29142914
interface Student {
2915+
constructor();
29152916
attribute unsigned long id;
29162917
stringifier attribute DOMString name;
29172918
};
@@ -2935,8 +2936,9 @@ a [=static attribute=].
29352936
not specified in the IDL itself.
29362937

29372938
<pre highlight="webidl">
2938-
[Exposed=Window, Constructor]
2939+
[Exposed=Window]
29392940
interface Student {
2941+
constructor();
29402942
attribute unsigned long id;
29412943
attribute DOMString? familyName;
29422944
attribute DOMString givenName;
@@ -5026,8 +5028,9 @@ No [=extended attributes=] are applicable to dictionaries.
50265028
consider the following [=IDL fragment=]:
50275029

50285030
<pre highlight="webidl">
5029-
[Exposed=Window, Constructor]
5031+
[Exposed=Window]
50305032
interface Point {
5033+
constructor();
50315034
attribute double x;
50325035
attribute double y;
50335036
};
@@ -6799,7 +6802,7 @@ which form (or forms) it is in:
67996802
<dfn id="dfn-xattr-argument-list" for="extended attribute" export>takes an argument list</dfn>
68006803
</td>
68016804
<td>
6802-
<code>[Constructor(double x, double y)]</code>
6805+
Not currently used; previously used by <code>[Constructor(double x, double y)]</code>
68036806
</td>
68046807
</tr>
68056808
<tr>
@@ -9193,8 +9196,9 @@ for the specific requirements that the use of
91939196
};
91949197

91959198
// Dimensions is available for use in workers and on the main thread.
9196-
[Exposed=(Window,Worker), Constructor(double width, double height)]
9199+
[Exposed=(Window,Worker)]
91979200
interface Dimensions {
9201+
constructor(double width, double height);
91989202
readonly attribute double width;
91999203
readonly attribute double height;
92009204
};
@@ -9435,8 +9439,10 @@ See [[#namespace-object]] for details on how an interface is exposed on a namesp
94359439
<pre highlight="webidl">
94369440
namespace Foo { };
94379441

9438-
[LegacyNamespace=Foo, Constructor]
9439-
interface Bar { };
9442+
[LegacyNamespace=Foo]
9443+
interface Bar {
9444+
constructor();
9445+
};
94409446
</pre>
94419447

94429448
In an ECMAScript implementation of the above namespace and interface, the
@@ -9562,7 +9568,6 @@ are to be implemented.
95629568

95639569
<pre highlight="webidl">
95649570
[Exposed=Window,
9565-
Constructor,
95669571
LegacyWindowAlias=WebKitCSSMatrix]
95679572
interface DOMMatrix : DOMMatrixReadOnly {
95689573
// ...
@@ -14149,9 +14154,9 @@ fragment:
1414914154

1415014155
<pre class="idl">
1415114156
[Exposed=(Window,Worker),
14152-
Constructor(optional DOMString message = "", optional DOMString name = "Error"),
1415314157
Serializable]
1415414158
interface DOMException { // but see below note about ECMAScript binding
14159+
constructor(optional DOMString message = "", optional DOMString name = "Error");
1415514160
readonly attribute DOMString name;
1415614161
readonly attribute DOMString message;
1415714162
readonly attribute unsigned short code;

0 commit comments

Comments
 (0)