/
544.txt
53 lines (37 loc) · 2.18 KB
/
544.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
* 分類
[6]
[FIG(short list)[
- [[カスタム要素構築器]]
]FIG]
* 名前の衝突
[2] [[MathML]] の [[DOM]] には [CODE(DOMa)@en[[[constructor]]]] [[DOM属性]]があります。
* 関数としての呼び出し
[4] [[WinIE]] と [[Firefox]] は関数として呼び出しても同じように動作しますが、 [[Chrome]] は例外
([CODE(JS)@en[[[TypeError]]]]) を投げます。 [TIME[2013-04-25T03:50:43.700Z]]
[5] [[WebIDL]] 仕様上は特に言及がなく、 [[Firefox]] の動作が正しそうです。 [TIME[2013-04-25T03:50:59.800Z]]
[REFS[
- [3] [CITE[constructor]] ([TIME[2013-04-25 03:49:01 +09:00]] 版) <http://suika.suikawiki.org/~wakaba/test/web/dom/binding/constructor/function-1.html>
]REFS]
* 歴史
[FIG(quote)[
[FIGCAPTION[
[1] [CITE[ECMAScript Language Specification (HTML version)]] ([TIME[2009-04-03 04:43:48 +09:00]] 版) <http://bclary.com/2004/11/07/#a-4.3.4>
]FIGCAPTION]
>A [DFN@en[constructor]] is a [CODE(JS)@en[[[Function]]]] [[object]] that creates and initialises [[objects]].
Each [[constructor]] has an associated [[prototype]] [[object]] that is used to implement [[inheritance]] and shared properties.
]FIG]
[7] [CITE@en[Remove support for '''['''Constructor''']''' on dictionaries (fixes #109).]]
( ([[Ms2ger]]著, [TIME[2016-04-20 20:34:07 +09:00]]))
<https://github.com/heycam/webidl/commit/1982dc3f17002c07f93b39e22f69846478e4a9e2>
[8] [CITE@en[Proposal: allow subclasses of constructible built-ins to be constructed · Issue #125 · heycam/webidl]]
( ([TIME[2016-06-13 11:45:28 +09:00]]))
<https://github.com/heycam/webidl/issues/125>
[9] [CITE@en[Throw when not calling interfaces as constructors (#205)]]
([[tobie]]著, [TIME[2016-11-04 06:12:42 +09:00]])
<https://github.com/heycam/webidl/commit/001ba520eb80c23133e65bc721f1f9910732316c>
[10] [CITE@en[Revamp interface bindings (#313)]]
([[tobie]]著, [TIME[2017-02-21 07:17:07 +09:00]])
<https://github.com/heycam/webidl/commit/4a8f57e276369db7ea5fb09974a09b0ca5d276dd>
[11] [CITE@en[Use Web IDL to construct custom element constructors]]
([[domenic]]著, [TIME[2017-03-28 13:20:59 +09:00]])
<https://github.com/whatwg/dom/commit/1ca094a209ba020348ac146c8bda157b7c5f3212>