Skip to content

Commit

Permalink
[] (0) change the 'popup' value on <menu type=''> to 'context', and r…
Browse files Browse the repository at this point in the history
…ewrite the section to use enumerated attribute value primitives.

git-svn-id: http://svn.whatwg.org/webapps@847 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 31, 2007
1 parent f1bb432 commit 073455c
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 53 deletions.
63 changes: 34 additions & 29 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -21631,33 +21631,38 @@ XXX selection ranges -->
commands.

<p>The <dfn id=type15 title=attr-menu-type><code>type</code></dfn>
attribute indicates the kind of menu. It must have either the value <code
title="">popup</code> (to declare a context menu) or the value <code
title="">toolbar</code> (to define a tool bar). The attribute may also be
omitted, to indicate that the element is merely a list of commands that is
neither declaring a context menu nor defining a tool bar.

<p>If a <code><a href="#menu">menu</a></code> element has a <code
title=attr-menu-type><a href="#type15">type</a></code> attribute with the
value <code title="">popup</code>, then it represents the commands of a
context menu, and the user can only interact with the commands if that
context menu is activated.

<p>If a <code><a href="#menu">menu</a></code> element has a <code
title=attr-menu-type><a href="#type15">type</a></code> attribute with the
value <code title="">toolbar</code>, then it represents a list of active
commands that the user can immediately interact with.

<p>Otherwise, if a <code><a href="#menu">menu</a></code> element has no
<code title=attr-menu-type><a href="#type15">type</a></code> attribute, or
if has a <code title=attr-menu-type><a href="#type15">type</a></code>
attribute with a value other than <code title="">popup</code> or <code
title="">toolbar</code>, then it either represents an unordered list of
items (each represented by an <code><a href="#li">li</a></code> element),
each of which represents a command that the user may perform or activate,
or, if the element has no <code><a href="#li">li</a></code> element
children, a <a href="#paragraph">paragraph</a> describing available
commands.
attribute is an <a href="#enumerated">enumerated attribute</a> indicating
the kind of menu being declared. The attribute has three states. The <code
title=attr-menu-type-context>context</code> keyword maps to the <dfn
id=context1 title="context menu state">context menu</dfn> state, in which
the element is declaring a context menu. The <code
title=attr-menu-type-toolbar>toolbar</code> keyword maps to the <dfn
id=tool-bar title="tool bar state">tool bar</dfn> state, in which the
element is declaraing a tool bar. The attribute may also be omitted. The
<i>missing value default</i> is the <dfn id=list title="list
state">list</dfn> state, which indicates that the element is merely a list
of commands that is neither declaring a context menu nor defining a tool
bar.

<p>If a <code><a href="#menu">menu</a></code> element's <code
title=attr-menu-type><a href="#type15">type</a></code> attribute is in the
<a href="#context1" title="context menu state">context menu</a> state,
then the element represents the commands of a context menu, and the user
can only interact with the commands if that context menu is activated.

<p>If a <code><a href="#menu">menu</a></code> element's <code
title=attr-menu-type><a href="#type15">type</a></code> attribute is in the
<a href="#tool-bar" title="tool bar state">tool bar</a> state, then the
element represents a list of active commands that the user can immediately
interact with.

<p>If a <code><a href="#menu">menu</a></code> element's <code
title=attr-menu-type><a href="#type15">type</a></code> attribute is in the
<a href="#list" title="list state">list state, then the element either
represents an unordered list of items (each represented by an
<code>li</code> element), each of which represents a command that the user
may perform or activate, or, if the element has no <code>li</code> element
children, a <span>paragraph</span> describing available commands.</a>

<p>The <dfn id=label1 title=attr-menu-label><code>label</code></dfn>
attribute gives the label of the menu. It is used by user agents to
Expand Down Expand Up @@ -21864,12 +21869,12 @@ XXX selection ranges -->
<li>Any separator at the start or end of the menu must be removed.
</ol>

<h5 id=context><span class=secno>3.18.4.3. </span><dfn id=context1>Context
<h5 id=context><span class=secno>3.18.4.3. </span><dfn id=context2>Context
menus</dfn></h5>

<p>The <dfn id=contextmenu
title=attr-contextmenu><code>contextmenu</code></dfn> attribute gives the
element's <a href="#context1" title="context menus">context menu</a>. The
element's <a href="#context2" title="context menus">context menu</a>. The
value must be the ID of a <code><a href="#menu">menu</a></code> element in
the DOM. If the node that would be obtained by the invoking the
<code>getElementById()</code> method using the attribute's value as the
Expand Down
55 changes: 31 additions & 24 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -19305,30 +19305,37 @@ XXX selection ranges -->
<p>The <code>menu</code> element represents a list of commands.</p>

<p>The <dfn title="attr-menu-type"><code>type</code></dfn> attribute
indicates the kind of menu. It must have either the value <code
title="">popup</code> (to declare a context menu) or the value <code
title="">toolbar</code> (to define a tool bar). The attribute may
also be omitted, to indicate that the element is merely a list of
commands that is neither declaring a context menu nor defining a
tool bar.</p>

<p>If a <code>menu</code> element has a <code
title="attr-menu-type">type</code> attribute with the value <code
title="">popup</code>, then it represents the commands of a context
menu, and the user can only interact with the commands if that
context menu is activated.</p>

<p>If a <code>menu</code> element has a <code
title="attr-menu-type">type</code> attribute with the value <code
title="">toolbar</code>, then it represents a list of active
commands that the user can immediately interact with.</p>

<p>Otherwise, if a <code>menu</code> element has no <code
title="attr-menu-type">type</code> attribute, or if has a <code
title="attr-menu-type">type</code> attribute with a value other than
<code title="">popup</code> or <code title="">toolbar</code>, then
it either represents an unordered list of items (each represented by
an <code>li</code> element), each of which represents a command that
is an <span>enumerated attribute</span> indicating the kind of menu
being declared. The attribute has three states. The <code
title="attr-menu-type-context">context</code> keyword maps to the
<dfn title="context menu state">context menu</dfn> state, in which
the element is declaring a context menu. The <code
title="attr-menu-type-toolbar">toolbar</code> keyword maps to the
<dfn title="tool bar state">tool bar</dfn> state, in which the
element is declaraing a tool bar. The attribute may also be
omitted. The <i>missing value default</i> is the <dfn title="list
state">list</dfn> state, which indicates that the element is merely
a list of commands that is neither declaring a context menu nor
defining a tool bar.</p>

<p>If a <code>menu</code> element's <code
title="attr-menu-type">type</code> attribute is in the <span
title="context menu state">context menu</span> state, then the
element represents the commands of a context menu, and the user can
only interact with the commands if that context menu is
activated.</p>

<p>If a <code>menu</code> element's <code
title="attr-menu-type">type</code> attribute is in the <span
title="tool bar state">tool bar</span> state, then the element
represents a list of active commands that the user can immediately
interact with.</p>

<p>If a <code>menu</code> element's <code
title="attr-menu-type">type</code> attribute is in the <span
title="list state">list</state> state, then the element either
represents an unordered list of items (each represented by an
<code>li</code> element), each of which represents a command that
the user may perform or activate, or, if the element has no
<code>li</code> element children, a <span>paragraph</span>
describing available commands.</p>
Expand Down

0 comments on commit 073455c

Please sign in to comment.