* 歴史

** menuitem 要素 type 属性 (XUL)

[14] [[XUL]] の [[menuitem]] 要素で、メニュー項目の型を指定します。
:(値なし):単なるメニュー項目 (既定値)。
:checkbox:入/切の状態のあるメニュー項目。
:radio:選択肢の1つであるメニュー項目。 [[name]] 属性と併用。

- [15] ''The <menuitem> Element'' <http://www.mozilla.org/xpfe/xulref/menuitem.html#type%20attribute,%20menuitemsIDX>

** HTML

[30] [CITE@en-GB-hixie[Web Applications Markup Language 1.0]], [TIME[2004-04-07T17:39:12.000Z]], [TIME[2024-09-01T05:47:43.261Z]] <http://www.hixie.ch/specs/html/apps/web-apps-1>

>
[PRE[
<Hixie> <input type="text" menu="foo" icon="g.png"/> <menu id="foo"> <menuitem icon="g.png" onclick="engine('google')">Google</menuitem> ... </menu>
]PRE]

;; [31] ソースコード注釈内。



[FIG(data)[ [216] [[HTML要素概説]]

:[F[要素名]]:[CODE[menu]]
:[F[要素名]]:[CODE[menuitem]]
:日付:[TIME[2004-04-07]]
:説明:
[TIME[2004-04-07]]版
[CITE@en-GB-hixie[Web Applications Markup Language 1.0]]
の文書ソース注釈に、
[CODE[menu]],
[CODE[menuitem]]
を使った[[メニュー]]の構想がある。
本文にも[[メニュー]]の構想があるが、
[[要素名]]は明記されていない。
:出典:
[REFS[

-
[CITE@en-GB-hixie[Web Applications Markup Language 1.0]], 
[DATA(.author)[[[Opera Software]]]],
[[Ian Hickson]],
[DATA(.status)[[[Working Draft]]]],
[TIME(.published)[7 April 2004][2004-04-07]],
[TIME[2004-04-07T17:39:12.000Z]], [TIME[2024-09-01T05:47:43.261Z]] <http://www.hixie.ch/specs/html/apps/web-apps-1>

]REFS]

]FIG]

[FIG(data)[ [32] [[HTML要素概説]]

:[F[要素名]]:[CODE[menu]]
:[F[要素名]]:[CODE[menulabel]]
:[F[要素名]]:[CODE[menubar]]
:日付:[TIME[2004-09-23]]
:説明:
[TIME[2004-09-23]]版
[CITE@en-GB-hixie[Web Applications 1.0]]
に、
[CODE[menu]],
[CODE[menulabel]],
[CODE[menubar]]
がある。
[[メニュー]]を表す。
[SEE[>>43]]
:出典:
[REFS[

-
[CITE@en-GB-hixie[Web Applications 1.0]], 
[DATA(.author)[[[WHATWG]]]],
[[Ian Hickson]],
[DATA(.status)[[[Working Draft]]]],
[TIME(.published)[23 September 2004][2004-09-23]],
[TIME[2024-09-01T06:53:36.000Z]], [TIME[2004-10-09T15:04:52.113Z]] <https://web.archive.org/web/20041009144718/http://whatwg.org/specs/web-apps/current-work/>

]REFS]
:注釈:
-
[43] 
[[XUL]] のものに由来するが違いが多い。

]FIG]

[33] [CITE['''['''whatwg''']''' [WA1] menus]], [TIME[2024-08-20T17:41:27.000Z]], [TIME[2024-09-01T07:26:58.348Z]] <https://lists.whatwg.org/pipermail/whatwg-whatwg.org/2004-August/044405.html>

[34] >>33 [TIME[2004-08-29]]時点では既に存在していた模様。

-*-*-



- [36] [CITE@en[13608 – Add <menuitem> element]], [TIME[2019-04-02T04:48:11.000Z]], [TIME[2024-09-06T14:36:42.091Z]] <https://www.w3.org/Bugs/Public/show_bug.cgi?id=13608>
-[16] [CITE[676236 – Add support for the <menuitem> element to the HTML parser]]
( ([TIME[2012-11-28 00:43:07 +09:00]] 版))
<https://bugzilla.mozilla.org/show_bug.cgi?id=676236>




[FIG(data)[ [37] [[HTML要素概説]]

:[F[要素名]]:[CODE[command]]
:[F[要素名]]:[CODE[menuitem]]
:日付:[TIME[2011-08-03]]
:説明:
[TIME[2011]]、
[[Gecko]]
は
[CODE[command]]
の実装を開発していたが、
[CODE[menuitem]]
と改称することを決め、
仕様書にも変更を提案した。
[SRC[>>41]]
[SRC[>>42]]
[[要素名]]は [[XUL]] によったものと考えられる。
:出典:
[REFS[

-
[41] 
[CITE@en[13608 – Add <menuitem> element]], 
Last modified: [TIME(.published)[2013-01-07 04:58:57 UTC][2013-01-07T04:58:57Z]],
[TIME[2019-04-02T04:48:11.000Z]], [TIME[2024-09-06T14:36:42.091Z]] <https://www.w3.org/Bugs/Public/show_bug.cgi?id=13608>
-
[42] 
[CITE[676236 – Add support for the <menuitem> element to the HTML parser]],
[TIME(.published)[2022-10-10 23:28 PDT][2022-10-10T23:28-07:00]]
<https://bugzilla.mozilla.org/show_bug.cgi?id=676236>

]REFS]

]FIG]

[38] 
[[Ian Hickson]] としては[[後方互換性]]や[[要素の意味]]を重視しつつ[[メニュー]]と[[ツールバー]]の機能を統合的に提供できる
[CODE[menu]]
と[[命令]]の一連の機能群の中で [CODE[command]] という要素名が適切という認識でした。

[39] 
一方 [[Gecko]] は複雑ではない[[文脈メニュー]]機能の実装を求めており、
メニューの記述のための簡潔な[[要素]]があればよく、
統合的なモデルなどよりも機能を率直に表した[[要素名]]で十分と考えていました。
[[WebKit]] の開発者も (実装の意向は明言しないものの)
それに賛同しています [SRC[>>36]]。


- [35] 
[CITE@en['''['''acgiow''']''' (1) Grand <menu> revamp. Note: This patch includes parser ch…]], [[Hixie]], [TIME[2012-12-29 10:23:20 +09:00]], [TIME[2024-09-06T14:23:03.000Z]] <https://github.com/whatwg/html/commit/9e2e25f4ae90969a7c64e0763c98548a35b50af8#diff-41cf6794ba4200b839c53531555f0f3998df4cbb01a4d5cb0b94e3ca5e23947d>


[17] [CITE[''''''[''''''whatwg'''''']'''''' <menu> and friends]]
( ([TIME[2013-01-10 08:56:09 +09:00]] 版))
<http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2013-January/038583.html>

[CITE@en['''['''whatwg''']''' <menu> and friends]] ([[Ian Hickson]]著, [TIME[2012-12-29 10:23:20 +09:00]]) <https://lists.w3.org/Archives/Public/public-whatwg-archive/2012Dec/0264.html>

[18] [CITE@en[Web Applications 1.0 r7640       Clean up some mistakes from the menu/command/menuitem shake-up recently.]]
( ([TIME[2013-01-10 05:25:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=7639&to=7640>


[FIG(data)[ [40] [[HTML要素概説]]

:[F[要素名]]:[CODE[command]]
:[F[要素名]]:[CODE[menuitem]]
:[F[要素名]]:[CODE[menu]]
:日付:[TIME[2011-08-03]]
:説明:
[TIME[2011-08-03]]、
[CITE[HTML Standard]]
の
[CODE[command]]
は
[CODE[menuitem]]
に改称された。これを含む [CODE[menu]] 機能は実装者の意向をもとに大幅に改められた。
:出典:
[REFS[

-
[CITE[HTML r7602]],
[DATA(.author)[[[Hixie]]]], 
[TIME(.published)[2012-12-29 10:23:20 +09:00]], [TIME[2024-09-06T14:23:03.000Z]] <https://github.com/whatwg/html/commit/9e2e25f4ae90969a7c64e0763c98548a35b50af8>

]REFS]

]FIG]




[19] [CITE[IRC logs: freenode / #whatwg / 20141126]]
( ([TIME[2014-11-27 17:23:06 +09:00]] 版))
<http://krijnhoetmer.nl/irc-logs/whatwg/20141126#l-166>

[20] [CITE@en[''''''[''''''whatwg'''''']'''''' <menuitem>: Issue reported by the web developers]]
( ([[Sanjoy Pal]] 著, [TIME[2014-11-26 14:52:43 +09:00]] 版))
<http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Nov/0143.html>

[1] [CITE@en-US[<menuitem> - HTML (HyperText Markup Language) | MDN]]
([TIME[2014-08-24 17:42:15 +09:00]] 版)
<https://developer.mozilla.org/en/docs/Web/HTML/Element/menuitem>

[2] [CITE@en-US[menuitem - Mozilla | MDN]]
([TIME[2014-10-22 19:03:50 +09:00]] 版)
<https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/menuitem>

[3] [CITE@en[Re: ''''''[''''''whatwg'''''']'''''' <menuitem>: Issue reported by the web developers]]
([[Tab Atkins Jr.]] 著, [TIME[2015-10-07 08:25:38 +09:00]] 版)
<https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Oct/0006.html>

[4] [CITE@en[Remove the "master command" concept from menuitem · whatwg/html@d65089b]]
([TIME[2015-11-11 22:44:16 +09:00]] 版)
<https://github.com/whatwg/html/commit/d65089b6a7bee7d7418a721c182cdf22c44e2b1c>

[5] [CITE@en[25325 – What is the rationale in having <menuitem> as a void element? It won't be backward compatible, and in addition to this if it had content allowed in form of text nodes, the label for the command could ''''''[''''''...'''''']'''''']]
([TIME[2016-02-06 12:47:42 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=25325>

[6] [CITE@en[Parsing: <menuitem> should not be a void element · Issue #234 · whatwg/html]]
([TIME[2016-02-06 12:51:00 +09:00]] 版)
<https://github.com/whatwg/html/issues/234>

[7] [CITE@en[12999 – Allow nodefault="" on <menu type=context>]]
([TIME[2016-03-29 11:16:44 +09:00]] 版)
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=12999>

[8] [CITE@en[Allow <menuitem> to have children giving the label · whatwg/html@8fdccb5]]
([TIME[2016-04-16 20:58:09 +09:00]] 版)
<https://github.com/whatwg/html/commit/8fdccb55e40a36449ae6011f9960cb09c1da0db7>

[9] [CITE@en[Fix #234: Change <menuitem> from void to like-<option> · whatwg/html@5e49a20]]
([TIME[2016-04-16 20:58:56 +09:00]] 版)
<https://github.com/whatwg/html/commit/5e49a20874fabef620bf7ea0be7534c73fbd58c4>

[10] [CITE@en[Remove <menuitem> from Special category]]
([[nolanw]]著, [TIME[2016-07-04 15:39:37 +09:00]])
<https://github.com/whatwg/html/commit/7ecbcf1a037449c3d58e26ec704f5cb4cbdcf903>

[11] [CITE@en[Reconstruct active formatting elements for <menuitem>]]
([[zcorpan]]著, [TIME[2016-08-11 02:46:18 +09:00]])
<https://github.com/whatwg/html/commit/2999aa01438bdef11ba10aef82b775293efbef79>

[12] [CITE@en[Align activation behavior with changes to DOM Standard]]
([[annevk]]著, [TIME[2016-10-21 00:06:40 +09:00]])
<https://github.com/whatwg/html/commit/7beb920ba2e1a71246b81d86005f223a0d7ac8ab>

[13] [CITE@en[Make <menuitem> parse like an unknown element]]
([[zcorpan]]著, [TIME[2017-02-03 18:25:11 +09:00]])
<https://github.com/whatwg/html/commit/0ca0377a7ca6d87fb40e0b97e0ee074300b39a32>

[21] [CITE@en[Remove the context menu feature]]
([[domenic]]著, [TIME[2017-06-09 03:16:29 +09:00]])
<https://github.com/whatwg/html/commit/e7e8c88ecdd7cdc96171f05ab6fe23b56dd48d8a>

[22] [CITE@en[17799 – srcset: Support different resolutions for command elements and images]]
([TIME[2017-07-23 16:33:42 +09:00]])
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=17799>

[23] [CITE@en[179020 – '''['''Touch Bar Web API''']''' Add support for menuitem tag]]
([TIME[2017-11-24 14:06:34 +09:00]])
<https://bugs.webkit.org/show_bug.cgi?id=179020>

[24] [CITE@en[Rethink to keep <menuitem> and context menu · Issue #2929 · whatwg/html]]
([TIME[2017-12-02 22:17:33 +09:00]])
<https://github.com/whatwg/html/issues/2929>

[25] [CITE@en[Touch Bar Web API: <menu type=touch-bar> and <menuitem> · Issue #3251 · whatwg/html]]
([TIME[2018-10-13 19:27:33 +09:00]])
<https://github.com/whatwg/html/issues/3251>

[FIG(quote)[
[FIGCAPTION[
[26] [CITE[Release Notes for Safari Technology Preview 44 | WebKit]]
([TIME[2018-10-13 13:28:28 +09:00]])
<https://webkit.org/blog/8035/release-notes-for-safari-technology-preview-44/>
]FIGCAPTION]

> Added support for the <menuitem> tag, currently off by default at runtime (r224457)

]FIG]


[27] [CITE[チェンジセット 224457 – WebKit]]
([TIME[2018-10-13 19:32:46 +09:00]])
<https://trac.webkit.org/changeset/224457/webkit/>

[28] [CITE['''['''webkit-dev''']''' Touch Bar Web API]]
([TIME[2017-10-28 06:15:04 +09:00]])
<https://lists.webkit.org/pipermail/webkit-dev/2017-October/029693.html>

[FIG(quote)[
[FIGCAPTION[
[29] ([TIME[2020-05-19 19:35:49 +09:00]])
<https://chidori-high-school.com/pdf/pdfjs/viewer/viewer.html?p=8fH5icfErinjEe8bSnermS6mktgHngcokgl(jAo8m55ojfiri6sEleb)pepoS6rko{Hmlcplgs6jrt8mH5ojfi(ip(Egibnmere&r=10&s=53&sj5_sh=H0G4G6GaH3I3I0I5G7%5fH0H3I3I1I7I0I2I6I5%5fI2I6I8&ns_sh=1&np_sh=1&title=%E3%83%A9%E3%82%A4%E3%83%95%E3%83%AA%E3%83%B3%E3%82%B0%EF%BC%94%20GO!GO!%20%E3%83%A9%E3%82%A4%E3%83%96%E3%83%BB%E3%82%A4%E3%82%BA%E3%83%BB%E3%83%93%E3%83%A5%E3%83%BC%E3%83%86%E3%82%A3%E3%83%95%E3%83%AB>
]FIGCAPTION]

>         <menu type="context" id="viewerContextMenu">
>           <menuitem id="contextFirstPage" label="First Page"
>                     data-l10n-id="first_page"></menuitem>
>           <menuitem id="contextLastPage" label="Last Page"
>                     data-l10n-id="last_page"></menuitem>
>           <menuitem id="contextPageRotateCw" label="右回転する"
>                     data-l10n-id="page_rotate_cw"></menuitem>
>           <menuitem id="contextPageRotateCcw" label="Rotate Counter-Clockwise"
>                     data-l10n-id="page_rotate_ccw"></menuitem>
>         </menu>

]FIG]
