3

I like the idea of the command element, but it doesn't seem to be supported in any (?) browser, well except IE9. But not in IE10. I'm curious why, is there any particular reason?

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Iris Classon
  • 5,752
  • 3
  • 33
  • 52

2 Answers2

3

As far as I'm aware the command element isn't supported in any browser. Firefox 15-19 does support the menu tag http://caniuse.com/#search=command , but doesn't use the command element as the official HTML5 recommends http://www.w3.org/TR/html5/interactive-elements.html#the-menu-element

I am not seeing the command element supported in IE9. Did you see that somewhere? It isn't listed in the MSDN IE9 Guide for Developers document http://msdn.microsoft.com/en-us/ie/hh410106#_HTML5_Semantic_Elements

As for why it isn't implemented in browsers other than Firefox, I'm not sure why that is the case. Maybe browsers aren't quite ready to answer the menu element and the complexities of that and usability, accessibility, etc...

The good news is that you can use a Polyfill for menu and command by using the following library https://github.com/medialize/jQuery-contextMenu I've not used it myself, but it was listed on Modernizr's HTML5 Cross Browser Polyfills wiki https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills

Elijah Manor
  • 17,923
  • 17
  • 72
  • 79
  • Hi Elijah!:) Thanks for the reply :) Marekd it as right answer, probably as close as we'll get to an answer on this one ;) As far as I know the Command is listed in the html spec - but has not been implemented. I was curious if there were any specific problems with the implementation or they just didn't see a need for it anymore. The tag is mentions several places: http://www.w3schools.com/tags/tag_command.asp http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html http://stackoverflow.com/questions/4800594/what-exactly-is-the-html5-command-tag-and-what-is-the-browser-support – Iris Classon Jan 05 '13 at 10:38
  • Iris, yep it is in the official specification, but it is strange why it hasn't been implemented at all in any browser that I am aware of. If I run across mention or implementation of it I'll try to let you know. – Elijah Manor Jan 06 '13 at 03:11
0

As said in https://stackoverflow.com/a/19606400/1331956, the command element has been removed in favor of menuitem. That's probably why it has been removed from IE.

Community
  • 1
  • 1
Florian Bender
  • 161
  • 2
  • 4