[webkit-dev] New feature: Implement command API in webkit
Ian Hickson
ian at hixie.ch
Thu Nov 24 09:32:49 PST 2011
On Thu, 24 Nov 2011, Ryosuke Niwa wrote:
>
> For example, the current design doesn't allow a single command be
> associated with multiple UI components such as toolbar, pane, and
> context menu because a command is defined at wherever UI component that
> triggers the command.
>
> However, in practice, many web apps share the same command state across
> multiple UI widgets such as toolbars and context menu. Take, "bold"
> command as an example. "bold" command can be disabled or checked (i.e.
> the selected text is in bold) and this state needs to shared across many
> UI elements.
Correct, though that is only a temporary limitation. I avoided adding this
because I figured adding too much at once would cause implementors to
avoid it. I'm happy to add it already if that is what it takes to get it
implemented. :-) The idea is to add a command="" attribute which takes an
ID and would then make the element defer to the element with that ID, so
that you only need define the command once and then refer to it from the
various places in the UI where you want to refer to it.
> I also don't think UA should auto-generate toolbars as most of web apps
> want to have a fine-grain control over the look and feel of their
> toolbars.
Agreed with the fine-grained control issue. I figured we would do that
using pseudo-elements and component decorators, but I haven't specced
anything out yet because those aren't ready yet.
--
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the webkit-dev
mailing list