-
Notifications
You must be signed in to change notification settings - Fork 4
/
545.txt
31 lines (22 loc) · 1.6 KB
/
545.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
* 仕様書
[REFS[
- [4] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-05-14 09:55:50 +09:00]]) <https://html.spec.whatwg.org/#concept-custom-element-definition-prototype>
]REFS]
* [F[プロトタイプ]] (カスタム要素定義)
[5] [[カスタム要素定義]]は、[DFN[[F[[RUBYB[[[プロトタイプ]]]@en[prototype]]]]]]を持ちます。
[F[プロトタイプ]]は、 [[JavaScript]] の[[オブジェクト]]です。 [SRC[>>4]]
* 関連
[3] [[プロトタイプ]]を用いる[[オブジェクト指向]]を特に[[プロトタイプ型]]と呼んで[[クラス型オブジェクト指向]]と区別します。
[2] [[JavaScript]] [[ライブラリー]]である [[Prototype.js]] は [[JavaScript]] [[言語]]の概念である「[[プロトタイプ]]」
と直接の関係はありません。
* 歴史
[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.5>
]FIGCAPTION]
>A [DFN@en[prototype]] is an [[object]] used to implement structure, state, and behaviour inheritance in [[ECMAScript]].
When a [[constructor]] creates an [[object]], that [[object]] implicitly references the [[constructor]]'s associated
[[prototype]] for the purpose of resolving [[property]] references. The [[constructor]]'s associated [[prototype]]
can be referenced by the [[program]] [[expression]] [CODE(JS)@en[[[constructor]].[[prototype]]]], and [[properties]]
added to an [[object]]'s [[prototype]] are shared, through [[inheritance]], by all [[objects]] sharing the [[prototype]].
]FIG]