* 仕様書

[REFS[
- [19] [CITE@en[DOM Standard]] ([TIME[2016-07-15 06:18:50 +09:00]]) <https://dom.spec.whatwg.org/#concept-element-is-value>
- [3] [CITE@en[DOM Standard]] ([TIME[2016-04-26 17:13:41 +09:00]] 版) <https://dom.spec.whatwg.org/#dom-elementcreationoptions-is>
- [10] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-05-14 09:55:50 +09:00]]) <https://html.spec.whatwg.org/#autonomous-custom-element>
- [6] '''[CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-05-14 09:55:50 +09:00]]) <https://html.spec.whatwg.org/#customized-built-in-element>'''
-- [15] [CITE@en-GB-x-hixie[HTML Standard]] ([TIME[2016-05-14 09:55:50 +09:00]]) <https://html.spec.whatwg.org/#attr-is>
]REFS]

* 意味

[7] [DFN[[RUBYB[カスタム化組み込み要素]@en[customized built-in element]]]]は、
[[カスタム要素]]のうち、 [CODE[extends]] オプション付きで定義されたものです [SRC[>>6]]。

[8] [[カスタム化組み込み要素]]の[F[局所名]]は、 [CODE[extends]]
オプションで指定された値となります。 [SRC[>>6]]

[9] [[カスタム化組み込み要素]]の[F[定義名]]は、 [CODE(HTMLa)@en[is][is=""]]
[[属性]]で指定された値となります。 [SRC[>>6]]

[12] [[カスタム化組み込み要素]]は、 [CODE[extends]] した元の[[要素の意味]]を[[継承]]します
[SRC[>>6]]。

* 内容属性

[13] [[カスタム化組み込み要素]]の[[内容属性]]には、
[CODE[extends]] した元の[[要素]]の制約がそのまま適用されます [SRC[>>6]]。

[14] [[著者]]が[[カスタム化組み込み要素]]の独自の指定を必要とする時は、
[CODE(HTMLa)@en[data-[VAR[*]]]] [[属性]]を使うことができます [SRC[>>6]]。

;; [[自律カスタム要素]]とは違って、任意の[[属性]]を使うことはできません。
将来の標準の[[属性]]の追加と衝突してしまうおそれがあるからです。

* [CODE(HTMLa)@en[is][is=""]] 属性

[16] [[HTML要素]]の [DFN[[CODE(HTMLa)@en[is][is=""]]]] [[内容属性]] [SRC[>>15]] は、
[[要素]]を[[カスタム化組み込み要素]]として使うことを表します。
その値は、[[カスタム化組み込み要素]]の[[カスタム要素定義]]の[F[名前][定義名]]を表します。

[4] [[辞書]] [CODE(DOMi)@en[ElementCreationOptions]] の[[メンバー]]
[DFN[[CODE(DOMa)@en[is][is=""]]]] は、 [CODE(DOMi)@en[DOMString]]
を指定するものです [SRC[>>3]]。 [CODE(DOMm)@en[createElement]] や
[CODE(DOMm)@en[createElementNS]] で、作成する[[要素]]の
[CODE(HTMLa)@en[is][is=""]] [[内容属性]]の値を設定するために使うことができます。

[11] [CODE(HTMLa)@en[is][is=""]] [[内容属性]]は、任意の [[HTML要素]]に指定できます。
ただし[[自律カスタム要素]]には、 [CODE(HTMLa)@en[is][is=""]] [[内容属性]]を指定しては[MUST[なりません]] [SRC[>>10]]。

[17] [[属性値]]は、[[著者]]の意図通りに動作するためには、
[[カスタム化組み込み要素]]の[[カスタム要素定義]]の[F[名前][定義名]]でなければなりません。
構文的には、
[[妥当なカスタム要素名]]でなければ[MUST[なりません]] [SRC[>>10]]。[[開始タグ]]に記述する場合
([[構文解析器]]が[[要素]]を作成する場合) には、
作成時点で[[スクリプト]]が未実行かもしれませんから、
既に[[カスタム要素定義]]が存在している必要はありません。
[CODE(DOMm)@en[createElement]] や [CODE(DOMm)@en[createElementNS]]
の [CODE(DOMa)@en[is][is=""]] [[メンバー]]で指定する場合は、
既に存在する[[カスタム要素定義]]の名前でなければなりません。

;; [[カスタム要素定義]]が他の[[スクリプト]]で作成される場合に、
作成まで待ってから [CODE(DOMm)@en[createElement]] が実行したい時には、
[CODE(DOMm)@en[whenDefined]] [[メソッド]]を使うと便利です。

[5] [CODE(HTMLa)@en[is][is=""]] [[内容属性]]は、[[要素の作成]]時に処理されます。
後から値を変更しても処理には影響しない [SRC[>>6]] ので、
作成と同時に指定する [CODE(DOMa)@en[is][is=""]] オプションが導入されました。

[20] [[要素]]は、 [DFN[[F[[RUBYB[[[[CODE[is]]値]]]@en[[CODE[is]] value]]]]]]を持ちます
[SRC[>>19]]。 これは[[要素]]作成時点の [CODE(HTMLa)@en[is][is=""]]
[[属性値]]を表しています。[[要素の作成]]時に設定されます。

[21] [[DOM Standard]] は、[[要素の作成]]時に [F[[[[CODE[is]]値]]]]も設定されるとし
[SRC[>>19]] ています。しかし[[要素の作成]]を経由しないケース ([[要素の作成]])
にどうなるのかは規定されていません。実際には [CODE[null]] 
が設定されるものと思われます (が、[[構文解析器]]からの作成時には
[CODE(HTMLa)@en[is][is=""]] [[属性値]]が設定される可能性もあります)。

* 歴史

[1] [CITE@en[Add support for custom elements · whatwg/dom@7f63535]]
([TIME[2016-04-13 22:21:04 +09:00]] 版)
<https://github.com/whatwg/dom/commit/7f63535da39a1cbf7f8f68563abc6f05f760990a>

[2] [CITE@en[Rename the types of custom elements · whatwg/html@7858636]]
([TIME[2016-04-26 18:38:52 +09:00]] 版)
<https://github.com/whatwg/html/commit/785863622acc5cc9faf1ff392ae17786ee7b3b80>

[18] [CITE@en[Save the is="" value an element was created with]]
( ([[domenic]]著, [TIME[2016-06-03 15:12:10 +09:00]]))
<https://github.com/whatwg/dom/commit/754bb8d533f1db664c6c00ddbe565b64cff18811>



[22] [CITE@en[Fix customized built-in element "is" handling and reactions]]
([[domenic]]著, [TIME[2016-06-07 01:55:58 +09:00]])
<https://github.com/whatwg/html/commit/4e632a82728d68a8a6bd32f02083762b7792ddf7>

[23] [CITE@en[Explicitly state “is” attribute conformance requirements]]
([[sideshowbarker]]著, [TIME[2016-12-17 05:09:43 +09:00]])
<https://github.com/whatwg/html/commit/43ab12538efab64c15151c9200713391cd7cb2f2>

[24] [CITE@en[The is="" attribute is confusing? Maybe we should encourage only ES6 class-based extension. · Issue #509 · w3c/webcomponents]]
([TIME[2017-03-07 21:37:59 +09:00]])
<https://github.com/w3c/webcomponents/issues/509>

[25] 
[[Apple]] ([[WebKit]]) は本機能に一貫して反対しており、
現在も実装予定はないと表明しています。[TIME[2017-06-03T01:10:35.400Z]]



[26] [CITE@en[Remove <applet>]]
([[zcorpan]]著, [TIME[2017-08-21 22:19:30 +09:00]])
<https://github.com/whatwg/html/commit/b9b9d60f9451c05f8e8d542e4094f987ae1a5fb8>

[27] [CITE@en[Change handling of is="" in element creation and cloning]]
([[domenic]]著, [TIME[2018-02-14 09:25:26 +09:00]])
<https://github.com/whatwg/dom/commit/fc601be94e75427c3eb35d63ada0f6dc41f9f344>

[28] [CITE@en[Update customized built-in elements is="" interaction]]
([[domenic]]著, [TIME[2018-02-14 11:31:01 +09:00]])
<https://github.com/whatwg/html/commit/e5dc6bf18f356225d90decc47ac6ed3be94728a7>

[29] [CITE@en[Change handling of is="" in element creation and cloning by domenic · Pull Request #566 · whatwg/dom]]
([TIME[2018-02-17 23:01:23 +09:00]])
<https://github.com/whatwg/dom/pull/566>

[30] [CITE@en[custom-elements: A step to add "is" content attribute in "new" · Issue #3402 · whatwg/html]]
([TIME[2018-02-17 23:02:49 +09:00]])
<https://github.com/whatwg/html/issues/3402>

[31] [CITE@en[Update customized built-in elements is="" interaction by domenic · Pull Request #3444 · whatwg/html]]
([TIME[2018-02-17 23:06:07 +09:00]])
<https://github.com/whatwg/html/pull/3444>

[32] [CITE@en[Polymer encouraged incorrect document.createElement() usage · Issue #544 · w3c/webcomponents]]
([TIME[2018-02-27 17:04:44 +09:00]])
<https://github.com/w3c/webcomponents/issues/544>

[33] [CITE@en[Allow createElement/createElementNS()'s dictionary argument to be a s… by annevk · Pull Request #572 · whatwg/dom]]
([TIME[2018-02-27 17:05:29 +09:00]])
<https://github.com/whatwg/dom/pull/572>

[34] [CITE@en[no custom builtin elements in WebKit · Issue #30 · Polymer/project]]
([TIME[2018-02-27 17:07:18 +09:00]])
<https://github.com/Polymer/project/issues/30>

[35] [CITE@en[Element Behaviors, and the has="" attribute. A useful alternative to Custom Elements in many cases! · Issue #727 · w3c/webcomponents]]
([TIME[2018-05-01 15:06:26 +09:00]])
<https://github.com/w3c/webcomponents/issues/727>

[36] [CITE@en[Correctly set "is value" in '''['''HTMLConstructor''']''']]
([[domenic]]著, [TIME[2018-06-28 06:25:44 +09:00]])
<https://github.com/whatwg/html/commit/6be3127514c4bbc36057bf8901493a2eb722ae9f>

[37] [CITE@en[Cloning Built-in customized elements, which are create using 'new Foo()' doesn't work because is-value isn't set · Issue #3776 · whatwg/html]]
([TIME[2018-06-29 23:38:34 +09:00]])
<https://github.com/whatwg/html/issues/3776>

[38] [CITE@en[Correctly set "is value" in '''['''HTMLConstructor''']''' by domenic · Pull Request #3777 · whatwg/html]]
([TIME[2018-06-29 23:38:50 +09:00]])
<https://github.com/whatwg/html/pull/3777>