* 仕様書

[REFS[
- [6] [CITE@en-US[DOM Standard]] ([TIME[2012-12-26 22:14:50 +09:00]] 版) <https://dom.spec.whatwg.org/#interface-domtokenlist>
]REFS]

* 状態

[14] 次の状態を持ちます。
[FIG(list members)[
: [F[関連付けられた[[要素]]]] : 関連付けられた[[要素]]です。
: [F[関連付けられた[[属性]]の[[局所名]]]] : 関連付けられた[[要素]]の[[属性]]の[[局所名]]です。
(対象となる[[属性]]はすべて[[null名前空間]]に属するので、[[局所名]]だけで識別できます。)
]FIG]

* 文脈

[46] [CODE[DOMTokenList]] [[インターフェイス]]は[[文書環境]]と[[ワーカー環境]]に[[晒され]]ています
[SRC[>>6]]。

[5] [CODE(DOMi)@en[[[DOMTokenList]]]] は次の場所で使われています。
[FIG(list short)[
- [CODE(DOMi)@en[[[Element]]]]
-- [CODE(DOMa)@en[[[classList]]]]
- [CODE(HTMLe)@en[[[a]]]], [CODE(HTMLe)@en[[[area]]]], [CODE(HTMLe)@en[[[link]]]]
-- [CODE(DOMa)@en[[[relList]]]]
- [CODE(HTMLe)@en[[[link]]]]
-- [CODE(DOMa)@en[[[sizes]]]]
- [CODE(HTMLe)@en[[[iframe]]]]
-- [CODE(DOMa)@en[[[sandbox]]]]
- [CODE(HTMLe)@en[[[th]]]], [CODE(HTMLe)@en[[[td]]]]
-- [CODE(DOMa)@en[[[headers]]]]
- [CODE(HTMLe)@en[[[output]]]]
-- [CODE(DOMa)@en[[[htmlFor]]]]

[HISTORY[
- [CODE(DOMi)@en[[[HTMLElement]]]]
-- [CODE(DOMa)@en[[[dropzone]]]]
-- [CODE(DOMa)@en[[[itemProp]]]]
-- [CODE(DOMa)@en[[[itemRef]]]]
-- [CODE(DOMa)@en[[[itemType]]]]
]HISTORY]
]FIG]

[41] すべて、[[内容属性]]を[[反映]]する[[IDL属性]]です。

;; [[反映]]参照。

* 関連

[4] 似た[[インターフェイス]]として [CODE(DOMi)@en[[[DOMStringList]]]] がありましたが、特に[[継承]]等の関係はありません。

* 歴史

** HTML Standard

@@ XXX

** DOM Standard

[REFS[
- [2] [CITE@en[Web Applications 1.0 r6328 Move DOMTokenList to DOM Core]]
( ([TIME[2011-07-27 08:44:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6327&to=6328>
- [3] [CITE[''''''[''''''whatwg'''''']'''''' DOMTokenList methods would be more useful with a space separated token list]]
( ([TIME[2012-05-03 10:37:01 +09:00]] 版))
<http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-May/035641.html>
- [7] [CITE@en[Web Applications 1.0 r7801 Update integration with DOM for DOMTokenList and DOMSettableTokenList]]
( ([TIME[2013-04-11 07:09:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7800&to=7801>
- [8] [CITE[IRC logs: freenode / #whatwg / 20130411]]
( ([TIME[2013-04-13 15:40:14 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20130411#l-180>
- [9] [CITE@en[DOMSettableTokenList has an associated attribute too · whatwg/dom@e48ced4]] ([TIME[2015-10-26 18:46:42 +09:00]] 版) <https://github.com/whatwg/dom/commit/e48ced42e68ce540c8d7c05d43868082f9d86f11>
]REFS]

[1] [CITE[classList、relList - 素人がプログラミングを勉強するブログ]] ([TIME[2009-02-08 18:10:09 +09:00]] 版) <http://d.hatena.ne.jp/javascripter/20090111/1231685097>

** 対応値検査の導入

[10] [CITE[IRC logs: freenode / #whatwg / 20151103]]
([TIME[2015-11-04 11:41:54 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20151103>

[11] [CITE[IRC logs: freenode / #whatwg / 20151113]]
([TIME[2015-11-14 13:10:48 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20151113>

[12] [CITE@en[Attempt to generalize the DOMTokenList requirements · whatwg/dom@ff81234]]
([TIME[2015-11-22 22:33:22 +09:00]] 版)
<https://github.com/whatwg/dom/commit/ff812344b45d6e256c5479f533897eca260d04b4>

[13] [CITE@en[Fix #91: DOMTokenList has an associated attribute's local name · whatwg/dom@ad73dc5]]
([TIME[2015-11-22 22:41:34 +09:00]] 版)
<https://github.com/whatwg/dom/commit/ad73dc520c16115c156cbd810a369ba02eb89072>

[15] [CITE@en[Fix #93: use less loops · whatwg/dom@244f66f]]
([TIME[2015-11-22 22:43:32 +09:00]] 版)
<https://github.com/whatwg/dom/commit/244f66fba9eb32f77d9454ae06ad7214f79fbc40>

[16] [CITE@en[Fix #105: sad DOMTokenList serialization is sad · whatwg/dom@2920fc1]]
([TIME[2015-11-22 23:30:18 +09:00]] 版)
<https://github.com/whatwg/dom/commit/2920fc15b9e894c45ff84c5d3bb77f7513ff50e5>

[17] [CITE@en[Add DOMTokenList hook to validate to added token · whatwg/dom@4674ad0]]
([TIME[2015-11-22 23:30:37 +09:00]] 版)
<https://github.com/whatwg/dom/commit/4674ad0caa3bb1841d07fa8dda3f80204f795dbc>

[18] [CITE@en[Add supported tokens to relList and sandbox · whatwg/html@f7a66ed]]
([TIME[2015-11-22 23:38:53 +09:00]] 版)
<https://github.com/whatwg/html/commit/f7a66ed52a93d3b63304f4a669e868684dc95b56>

[19] [CITE@en[Editorial tweak around "supported tokens" · whatwg/html@9a530ce]]
([TIME[2015-11-22 23:39:02 +09:00]] 版)
<https://github.com/whatwg/html/commit/9a530ce14e2537bd2a4bbec06a7a25c0fa4bb027>

[20] [CITE@en[Add DOMTokenList hook to validate to added token · whatwg/dom@4674ad0]]
([TIME[2015-11-23 00:18:50 +09:00]] 版)
<https://github.com/whatwg/dom/commit/4674ad0caa3bb1841d07fa8dda3f80204f795dbc>

[21] [CITE@en[Add a validation step when a new DOMTokenList is created · whatwg/dom@63a0302]]
([TIME[2015-11-23 00:19:01 +09:00]] 版)
<https://github.com/whatwg/dom/commit/63a030265fc3dac400a99f729fd5874490ae335c>

[22] [CITE@en[Fix #28: introduce DOMTokenList's replace() · whatwg/dom@f7dfc82]]
([TIME[2015-11-23 00:19:41 +09:00]] 版)
<https://github.com/whatwg/dom/commit/f7dfc82f34426cb9f626af252a693d05ea933dc8>

[23] [CITE@en[Close #123: remove feature detection from add() and add supports() · whatwg/dom@ff4f0e8]]
([TIME[2015-12-19 23:26:21 +09:00]] 版)
<https://github.com/whatwg/dom/commit/ff4f0e8bf0a1ef5829411fc5988f94a75118f73b>

[24] [CITE@en[28796 – Feature testing for <link rel>]]
([TIME[2016-01-26 10:48:44 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=28796>

[25] [CITE@en[29061 – iframe@sandbox support should be feature-detectable.]]
([TIME[2016-01-26 10:49:30 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=29061>

** [CODE(DOMi)@en[DOMSettableTokenList]]

[REFS[
- [28] [CITE@en-US[DOM Standard]] ([TIME[2012-12-26 22:14:50 +09:00]] 版) <https://dom.spec.whatwg.org/#interface-domsettabletokenlist>
]REFS]

[29] [CITE@en[DOMSettableTokenList has an associated attribute too · whatwg/dom@e48ced4]] ([TIME[2015-10-26 18:46:42 +09:00]] 版) <https://github.com/whatwg/dom/commit/e48ced42e68ce540c8d7c05d43868082f9d86f11>

[30] [CITE@en[DOMSettableTokenList needs an associated content attribute · Issue #81 · whatwg/dom]] ([TIME[2015-10-26 18:53:01 +09:00]] 版) <https://github.com/whatwg/dom/issues/81>

[31] [CITE[IRC logs: freenode / #whatwg / 20151125]]
([TIME[2015-11-26 13:42:12 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20151125>

[32] [CITE[IRC logs: freenode / #whatwg / 20151126]]
([TIME[2015-11-27 17:51:59 +09:00]] 版)
<http://krijnhoetmer.nl/irc-logs/whatwg/20151126>

** [CODE(DOMi)@en[DOMTokenList]] と [CODE(DOMi)@en[DOMSettableTokenList]] の統合

[27] [CODE(DOMa)@en[[[relList]]]] と [CODE(DOMa)@en[[[classList]]]]
は [CODE(DOMi)@en[[[DOMTokenList]]]]、それ以外はその[[子インターフェイス]]の
[DFN[[CODE(DOMi)@en[[[DOMSettableTokenList]]]]]] とされていましたが、
2015年11月に両者は統合されました。

[REFS[
- [26] [CITE@en[Fix #119: merge DOMSettableTokenList into DOMTokenList · whatwg/dom@07e9fc0]] ([TIME[2016-02-04 18:36:17 +09:00]] 版) <https://github.com/whatwg/dom/commit/07e9fc014ba54a185cb8c62016f088fd9181be6f>
]REFS]


[33] [CITE@en[Fix #358: use DOMTokenList exclusively · whatwg/html@98183f9]]
([TIME[2016-02-04 18:45:48 +09:00]] 版)
<https://github.com/whatwg/html/commit/98183f98c609d61e508bbec46b7ab86d37b99b47>

[34] [CITE@en[Adding ''''''[''''''SameObject'''''']'''''' to DOMTokenLists · whatwg/html@ec1dc4d]]
([TIME[2016-02-18 11:09:28 +09:00]] 版)
<https://github.com/whatwg/html/commit/ec1dc4d4571c61cf0c0dfe3e562898635886b412>

[35] [CITE@en[Shadow: define superglobal slot content attribute · whatwg/dom@e3d8291]]
([TIME[2016-03-24 21:59:32 +09:00]] 版)
<https://github.com/whatwg/dom/commit/e3d82914676ad1e1bf590e1042636e60feddb6ae>

[36] [CITE@en[Use a single concept for attribute changes · whatwg/dom@4b291d1]]
([TIME[2016-04-19 17:12:40 +09:00]] 版)
<https://github.com/whatwg/dom/commit/4b291d1a91a1e8b59997d4b021137d809706bd37>

[37] [CITE@en[Formalize custom element reactions · whatwg/html@27aa7bc]]
([TIME[2016-04-26 18:54:00 +09:00]] 版)
<https://github.com/whatwg/html/commit/27aa7bc4fa6f168654a8c858f0773e611f679b39>

[38] [CITE@en[Add ''''''[''''''CEReactions'''''']'''''' annotations to mutating methods · whatwg/dom@3cd02d1]]
([TIME[2016-04-26 19:09:43 +09:00]] 版)
<https://github.com/whatwg/dom/commit/3cd02d139c159a31fbb400e03932652c72fc7812>

[39] [CITE@en[27114 – Make DOMTokenList constructible]]
([TIME[2016-08-17 21:04:44 +09:00]])
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=27114>

[40] [CITE@en[Editorial: simplify DOMTokenList IDL]]
([[annevk]]著, [TIME[2016-08-25 17:39:25 +09:00]])
<https://github.com/whatwg/dom/commit/cb85ac4c35baa1345f2b71e2dd3d57b098ddf2d1>

[42] [CITE@en[Always update a DOMTokenList]]
([[annevk]]著, [TIME[2017-04-19 22:00:17 +09:00]])
<https://github.com/whatwg/dom/commit/d396872f847d63b803393092eb81843e80d566b7>

[43] [CITE@en[Always update a DOMTokenList]]
([[annevk]]著, [TIME[2017-04-19 22:00:17 +09:00]])
<https://github.com/whatwg/dom/commit/d396872f847d63b803393092eb81843e80d566b7>

[44] [CITE@en[Add '''['''Exposed''']''' to DOMTokenList]]
([[annevk]]著, [TIME[2017-08-22 21:22:58 +09:00]])
<https://github.com/whatwg/dom/commit/da7b3ec5d9a4cbd857f0dc6c5ef164331ae156be>

[45] [CITE@en[Add '''['''Exposed''']''' to DOMTokenList by annevk · Pull Request #499 · whatwg/dom]]
([TIME[2017-09-01 11:07:53 +09:00]])
<https://github.com/whatwg/dom/pull/499>

[47] [CITE@en[<span class="a b c">.classList.replace("c", "a") -> "a b" or "b a"? (DOMTokenList) · Issue #442 · whatwg/dom]]
([TIME[2017-09-03 13:33:40 +09:00]])
<https://github.com/whatwg/dom/issues/442>

[48] [CITE@en[DOMTokenList.add/remove normalize dupes/whitespace even if they're no-ops, but .toggle doesn't · Issue #443 · whatwg/dom]]
([TIME[2017-09-03 13:33:54 +09:00]])
<https://github.com/whatwg/dom/issues/443>

[49] [CITE@en[Always update a DOMTokenList by annevk · Pull Request #444 · whatwg/dom]]
([TIME[2017-09-03 13:34:22 +09:00]])
<https://github.com/whatwg/dom/pull/444>

[50] [CITE@en[Web reality: DOMTokenList's toggle() cannot always update the corresponding attribute · Issue #451 · whatwg/dom]]
([TIME[2017-09-03 13:36:30 +09:00]])
<https://github.com/whatwg/dom/issues/451>

[51] [CITE@en[DOMTokernList's toggle() cannot always update the attribute by annevk · Pull Request #452 · whatwg/dom]]
([TIME[2017-09-03 13:36:50 +09:00]])
<https://github.com/whatwg/dom/pull/452>

[52] [CITE@en[Editorial: give replace() the same note as toggle()]]
([[annevk]]著, [TIME[2017-08-08 17:11:27 +09:00]])
<https://github.com/whatwg/dom/commit/bcb0b3f93f487c1300aa51302a7a376492c2ffd4>

[53] [CITE@en[Make the DOMTokenList creation steps use "get an attribute value"]]
([[TRowbotham]]著, [TIME[2018-08-09 00:26:22 +09:00]])
<https://github.com/whatwg/dom/commit/28cdb47e557c814fcca60759f4cce43e9c0e9a47>

[54] [CITE@en["When a DOMTokenList object is created, then: ..." · Issue #666 · whatwg/dom]]
([TIME[2018-08-14 23:48:16 +09:00]])
<https://github.com/whatwg/dom/issues/666>

[55] [CITE@en[Make the DOMTokenList creation steps use "get an attribute value" by TRowbotham · Pull Request #673 · whatwg/dom]]
([TIME[2018-08-14 23:49:02 +09:00]])
<https://github.com/whatwg/dom/pull/673>