* 分類

[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>

[12] [CITE@en[Link function objects and constructors to relevant DFNs in ES (#418)]]
([[tobie]]著, [TIME[2017-08-19 18:09:47 +09:00]])
<https://github.com/heycam/webidl/commit/080bceaf43d9bee642aa797a21b3bd203b74c684>

[13] [CITE@en[Link function objects and constructors to relevant DFNs in ES by tobie · Pull Request #418 · heycam/webidl]]
([TIME[2017-08-20 11:15:07 +09:00]])
<https://github.com/heycam/webidl/pull/418>

[14] [CITE@en[Update the requirement about the definition of a constructor (#697)]]
([[Ms2ger]]著, [TIME[2019-03-27 00:13:57 +09:00]])
<https://github.com/heycam/webidl/commit/c86c55b069ba1146aa345f819cd9833e5bcf51bf>

[15] [CITE@en[Update the requirement about the definition of a constructor by Ms2ger · Pull Request #697 · heycam/webidl]]
([TIME[2019-08-14 11:27:58 +09:00]])
<https://github.com/heycam/webidl/pull/697>

[16] [CITE@en[Disallow combining Global with Constructor/NamedConstructor. (#745)]]
([[Ms2ger]]著, [TIME[2019-06-28 04:28:25 +09:00]])
<https://github.com/heycam/webidl/commit/a029460787be46f850abfc60f35cc6da05145b89>

[17] [CITE@en[Disallow combining Global with Constructor/NamedConstructor. by Ms2ger · Pull Request #745 · heycam/webidl]]
([TIME[2020-01-12 14:59:13 +09:00]])
<https://github.com/heycam/webidl/pull/745>

[18] [CITE@en[Should make it clear that '''['''Global''']''' and '''['''Constructor''']''' can't coexist · Issue #744 · heycam/webidl]]
([TIME[2020-01-12 14:59:33 +09:00]])
<https://github.com/heycam/webidl/issues/744>

[19] [CITE@en[Use new syntax for DOMException. (#780)]]
([[Ms2ger]]著, [TIME[2019-08-29 23:21:42 +09:00]])
<https://github.com/heycam/webidl/commit/21ffd9bd979bbebc99d1b7ed28c4f56b7c02b018>

[20] [CITE@en[Use new syntax for DOMException. by Ms2ger · Pull Request #780 · heycam/webidl]]
([TIME[2020-01-12 17:10:23 +09:00]])
<https://github.com/heycam/webidl/pull/780>

[21] [CITE@en[Revert "Use new syntax for DOMException. (#780)"]]
([[bzbarsky]]著, [TIME[2019-08-30 00:25:08 +09:00]])
<https://github.com/heycam/webidl/commit/182b487c128bce00e62431f19458c15fe91e9738>

[22] [CITE@en[Revert "Use new syntax for DOMException." by bzbarsky · Pull Request #781 · heycam/webidl]]
([TIME[2020-01-12 17:14:20 +09:00]])
<https://github.com/heycam/webidl/pull/781>

[23] [CITE@en[Stop using extended attributes for constructors]]
([[Ms2ger]]著, [TIME[2019-03-26 23:26:37 +09:00]])
<https://github.com/heycam/webidl/commit/91ca6ebb4d4fca9703309e19256bbc5f5dd77e3c>

[24] [CITE@en[Stop using extended attributes for constructors by Ms2ger · Pull Request #700 · heycam/webidl]]
([TIME[2020-01-12 19:20:59 +09:00]])
<https://github.com/heycam/webidl/pull/700>

[25] [CITE@en[Stop using extended attributes for constructors · Issue #636 · heycam/webidl]]
([TIME[2020-01-12 19:22:41 +09:00]])
<https://github.com/heycam/webidl/issues/636>

[26] [CITE@en[Allow "constructor" as an argument name (#786)]]
([[saschanaz]]著, [TIME[2019-09-02 18:16:24 +09:00]])
<https://github.com/heycam/webidl/commit/fad813abd912f39f00a898181a6f306e38c5413e>

[27] [CITE@en[Allow "constructor" as an argument name by saschanaz · Pull Request #786 · heycam/webidl]]
([TIME[2020-01-12 20:24:11 +09:00]])
<https://github.com/heycam/webidl/pull/786>

[28] [CITE@en[Should "constructor" be allowed as an argument name? · Issue #779 · heycam/webidl]]
([TIME[2020-01-12 20:24:46 +09:00]])
<https://github.com/heycam/webidl/issues/779>

[29] [CITE@en[Updating constructor definitions (#1470)]]
([[jakearchibald]]著, [TIME[2019-09-11 10:49:12 +09:00]])
<https://github.com/w3c/ServiceWorker/commit/2500c4c29540ec685891837556e13a51a297d51a>

[30] [CITE@en[Updating constructor definitions by jakearchibald · Pull Request #1470 · w3c/ServiceWorker]]
([TIME[2020-01-13 13:11:46 +09:00]])
<https://github.com/w3c/ServiceWorker/pull/1470>

[31] [CITE@en[Update to constructor operations · Issue #1464 · w3c/ServiceWorker]]
([TIME[2020-01-13 13:11:56 +09:00]])
<https://github.com/w3c/ServiceWorker/issues/1464>

[32] [CITE@en[Fix "overriden" typo (#806)]]
([[TimothyGu]]著, [TIME[2019-09-26 23:18:07 +09:00]])
<https://github.com/heycam/webidl/commit/3f89daf3dfda699a7a1931b5415dc6ed2ee16d05>

[33] [CITE@en[Fix "overriden" typo by TimothyGu · Pull Request #806 · heycam/webidl]]
([TIME[2020-01-13 13:19:21 +09:00]])
<https://github.com/heycam/webidl/pull/806>

[34] [CITE@en[Align with IDL constructor changes]]
([[autokagami]]著, [TIME[2019-09-24 22:59:06 +09:00]])
<https://github.com/whatwg/encoding/commit/370ad805f7795be33a4f9fa95cc349da6999476d>

[35] [CITE@en[Update to constructor operations · Issue #183 · whatwg/encoding]]
([TIME[2020-01-28 20:37:59 +09:00]])
<https://github.com/whatwg/encoding/issues/183>

[36] [CITE@en['''['''encoding''']''' Align with Web IDL specification by autokagami · Pull Request #186 · whatwg/encoding]]
([TIME[2020-01-28 20:38:09 +09:00]])
<https://github.com/whatwg/encoding/pull/186>

[37] [CITE@en[Align with IDL constructor changes]]
([[autokagami]]著, [TIME[2019-09-24 22:59:53 +09:00]])
<https://github.com/whatwg/fetch/commit/eff7659a2cb15aed801a9dbfc00c58e22efbbd42>

[38] [CITE@en[Update to constructor operations · Issue #929 · whatwg/fetch]]
([TIME[2020-01-28 20:39:20 +09:00]])
<https://github.com/whatwg/fetch/issues/929>

[39] [CITE@en['''['''fetch''']''' Align with Web IDL specification by autokagami · Pull Request #940 · whatwg/fetch]]
([TIME[2020-01-28 20:39:30 +09:00]])
<https://github.com/whatwg/fetch/pull/940>

[40] [CITE@en[Editorial: use new constructor syntax from WebIDL (#296)]]
([[marcoscaceres]]著, [TIME[2019-09-16 14:11:40 +09:00]])
<https://github.com/w3c/IndexedDB/commit/f3a43a706a15d21cd0232ef44dafb4c76f7c5a86>

[41] [CITE@en[Editorial: use new constructor syntax from WebIDL by marcoscaceres · Pull Request #296 · w3c/IndexedDB · GitHub]]
([TIME[2020-05-14 11:39:41 +09:00]])
<https://github.com/w3c/IndexedDB/pull/296>

[42] [CITE@en[Update to constructor operations · Issue #293 · w3c/IndexedDB · GitHub]]
([TIME[2020-05-14 11:39:55 +09:00]])
<https://github.com/w3c/IndexedDB/issues/293>

[43] [CITE@en[Use new constructor() syntax (#236)]]
([[ChunMinChang]]著, [TIME[2019-09-20 14:42:16 +09:00]])
<https://github.com/w3c/mediasession/commit/998ff76217cb95c1f4dfb95c5e811f176a09ccac>

[44] [CITE@en[Use new constructor() syntax by ChunMinChang · Pull Request #236 · w3c/mediasession]]
([TIME[2020-05-14 12:51:17 +09:00]])
<https://github.com/w3c/mediasession/pull/236>

[45] [CITE@en[Update to constructor operations · Issue #235 · w3c/mediasession]]
([TIME[2020-05-14 12:51:43 +09:00]])
<https://github.com/w3c/mediasession/issues/235>

[46] [CITE@en[Define "overridden constructor steps"]]
([[domenic]]著, [TIME[2019-09-24 12:34:41 +09:00]])
<https://github.com/heycam/webidl/commit/9c597595875df28f39e0dce520bb96f05c6f6a37>

[47] [CITE@en[Define "usual constructor steps" by domenic · Pull Request #797 · heycam/webidl]]
([TIME[2020-05-14 13:38:29 +09:00]])
<https://github.com/heycam/webidl/pull/797>

[48] [CITE@en['''['''CSP3''']''' Align with Web IDL specification (#410)]]
([[autokagami]]著, [TIME[2019-09-24 18:09:56 +09:00]])
<https://github.com/w3c/webappsec-csp/commit/4ef6262f53c1c60aff086c6db87d2071fc281b7c>

[49] [CITE@en['''['''CSP3''']''' Align with Web IDL specification by autokagami · Pull Request #410 · w3c/webappsec-csp]]
([TIME[2020-05-14 14:01:11 +09:00]])
<https://github.com/w3c/webappsec-csp/pull/410>

[50] [CITE@en['''['''credential-management-1''']''' Align with Web IDL specification (#142)]]
([[autokagami]]著, [TIME[2019-09-24 18:10:03 +09:00]])
<https://github.com/w3c/webappsec-credential-management/commit/315cc3dc2a5bb8f994fcb8e6644a76d224d2be7d>

[51] [CITE@en['''['''credential-management-1''']''' Align with Web IDL specification by autokagami · Pull Request #142 · w3c/webappsec-credential-management]]
([TIME[2020-05-14 14:02:16 +09:00]])
<https://github.com/w3c/webappsec-credential-management/pull/142>

[52] [CITE@en[Align with IDL constructor changes]]
([[autokagami]]著, [TIME[2019-09-24 22:42:56 +09:00]])
<https://github.com/whatwg/dom/commit/57512fac17cf2f1c4c85be4aec178c8086ee5ee4>

[53] [CITE@en[Update to constructor operations · Issue #780 · whatwg/dom]]
([TIME[2020-05-14 14:04:32 +09:00]])
<https://github.com/whatwg/dom/issues/780>

[54] [CITE@en[Use Web IDL constructor operations by foolip · Pull Request #782 · whatwg/dom]]
([TIME[2020-05-14 14:05:40 +09:00]])
<https://github.com/whatwg/dom/pull/782>

[55] [CITE@en[Align with IDL constructor changes]]
([[autokagami]]著, [TIME[2019-09-24 22:38:05 +09:00]])
<https://github.com/whatwg/notifications/commit/976813ca068627405c972318441622ad94ff7557>

[56] [CITE@en['''['''notifications''']''' Align with Web IDL specification by autokagami · Pull Request #151 · whatwg/notifications]]
([TIME[2020-05-14 14:06:55 +09:00]])
<https://github.com/whatwg/notifications/pull/151>

[57] [CITE@en[Align with IDL constructor changes]]
([[autokagami]]著, [TIME[2019-09-24 22:47:10 +09:00]])
<https://github.com/whatwg/xhr/commit/22424f0eed9696a935fb441e8cede66517fc5490>

[58] [CITE@en['''['''xhr''']''' Align with Web IDL specification by autokagami · Pull Request #261 · whatwg/xhr]]
([TIME[2020-05-14 14:08:02 +09:00]])
<https://github.com/whatwg/xhr/pull/261>

[59] [CITE@en[Update to constructor operations · Issue #254 · whatwg/xhr]]
([TIME[2020-05-14 14:08:10 +09:00]])
<https://github.com/whatwg/xhr/issues/254>

[60] [CITE@en[Align with IDL constructor changes]]
([[autokagami]]著, [TIME[2019-09-24 22:58:20 +09:00]])
<https://github.com/whatwg/url/commit/5f8576eeb2004e973db681de3239ae39bcec4cb8>

[61] [CITE@en[Align with IDL constructor changes]]
([[autokagami]]著, [TIME[2019-09-24 22:58:20 +09:00]])
<https://github.com/whatwg/url/commit/5f8576eeb2004e973db681de3239ae39bcec4cb8>

[62] [CITE@en['''['''url''']''' Align with Web IDL specification by autokagami · Pull Request #450 · whatwg/url]]
([TIME[2020-05-14 14:09:32 +09:00]])
<https://github.com/whatwg/url/pull/450>

[63] [CITE@en[Update to constructor operations · Issue #447 · whatwg/url]]
([TIME[2020-05-14 14:09:48 +09:00]])
<https://github.com/whatwg/url/issues/447>

[64] [CITE@en[Remove use of '''['''Constructor''']''' extended attribute]]
([[clelland]]著, [TIME[2019-09-22 04:35:33 +09:00]])
<https://github.com/heycam/webidl/commit/9e514c9dcfb09919af971931409aa075451804a5>

[65] [CITE@en[Remove use of '''['''Constructor''']''' extended attribute by clelland · Pull Request #798 · heycam/webidl]]
([TIME[2020-05-14 14:26:18 +09:00]])
<https://github.com/heycam/webidl/pull/798>

[66] [CITE@en[Update to constructor operations · Issue #4870 · whatwg/html]]
([TIME[2021-03-16T07:33:48.000Z]])
<https://github.com/whatwg/html/issues/4870>