HTMLMenuElement and HTMLCommandElement polyfill
The implementation is loosely based on the W3C HTMLMenuElement / HTMLCommandElement Specification.
Toolbar:
<menu type="toolbar" label="Tweets">
<command type="command" label="Back" icon="back-arrow.png" disabled="false" accesskey="back" />
<command type="command" label="Options" icon="gear.png" disabled="false" />
</menu>
Context Menu:
<menu type="context">
<command label="Tweets" icon="bubble.png" disabled="false" />
<command label="Replies" icon="reply.png" disabled="false" />
<command label="Search" icon="search.png" disabled="false" accesskey="search" />
<command label="Profile" icon="profile.png" disabled="false" />
</menu>
HTMLMenuElement:
- appendChild(...)
- removeChild(...)
- setAttribute(...);
- removeAttribute(...)
HTMLCommandElement:
- setAttribute(...);
- removeAttribute(...)