Iris Classon
Iris Classon - In Love with Code

Stupid Question 83: What does the HTML5 Command tag do, and is this similar to commands in XAML?

[To celebrate my first year of programming I will ask a ‘stupid’ questions daily on my blog for a year, to make sure I learn at least 365 new things during my second year as a developer]

.

When working with XAML technologies you have something called ‘Commands’ - basically this is a way to have an action that can be invoked from different sources and in different ways. Often copy, cut and paste are used as perfect command examples. While sharpening my HTML5 skills I came across a new tag I haven’t seen before, the command tag. And my first question was, is this what I think it is? I decided to find out.

It does seem like it is similar - but not quite the same (as the command is defined in the UI, plus it has to be invoked from a menu, buttons and or links), you define a command and tie an action to it, so the command can be invoked from several sources. This gives you an abstraction that allows you to manipulate the command instead of the elements tied to it when you have to (enable/disable).

I was very keen on trying this out, but couldn’t find any browsers that supports this tag :( So we will have to wait….
Edit: Works in IE9 - but not IE10 ??

Comments

Leave a comment below, or by email.
Iris Classon
11/18/2012 3:36:03 PM
Reply to: gareth
Thank you Gareth :) I tested in Safari for chrome a few seconds ago, and nope :/ did not work 
gareth
11/18/2012 2:09:38 PM
another excellent question Iris. Does command not work in Safari? 


Last modified on 2012-11-16

comments powered by Disqus