W3C home > Mailing lists > Public > public-html@w3.org > July 2009

linking other elements to a "command"

From: Hallvord R. M. Steen <hallvord@opera.com>
Date: Wed, 22 Jul 2009 12:08:45 +0200
To: public-html@w3.org
Message-ID: <op.uxgrsvj0a3v5gv@hr-opera.oslo.opera.com>
Hi,
the text about the "command concept" here:
http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#concept-command

states: "Once a command is defined, other parts of the interface can refer  
to the same command".

On reading that, I thought the spec intended to allow several  
buttons/links/interactive features in a page to refer back to one command  
(thus "inherit" that command's disabled/checked/hidden states to the  
extent they would make sense for that element).

The spec doesn't actually seem to enable this though. If I do
<menu><command id="c" onclick="foo()" title="Do foo  
action"></command></menu>
and want a <button> elsewhere to represent that command, how do I link the  
<button> element to the <command>? Did I misunderstand the concept?

-- 
Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/
Received on Wednesday, 22 July 2009 10:08:34 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:48 UTC