[html5] r1894 - [] (0) First draft (very experimental) of <bb>. Not sure if we'll want to keep this.

whatwg at whatwg.org whatwg at whatwg.org
Mon Jul 21 18:00:16 PDT 2008


Author: ianh
Date: 2008-07-21 18:00:16 -0700 (Mon, 21 Jul 2008)
New Revision: 1894

Modified:
   index
   source
Log:
[] (0) First draft (very experimental) of <bb>. Not sure if we'll want to keep this.

Modified: index
===================================================================
--- index	2008-07-21 19:38:00 UTC (rev 1893)
+++ index	2008-07-22 01:00:16 UTC (rev 1894)
@@ -24,7 +24,7 @@
 
    <h1 id=html-5>HTML 5</h1>
 
-   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 21 July
+   <h2 class="no-num no-toc" id=draft>Draft Recommendation — 22 July
     2008</h2>
 
    <p>You can take part in this work. <a
@@ -976,37 +976,48 @@
        <li><a href="#the-command"><span class=secno>4.11.3 </span>The
         <code>command</code> element</a>
 
-       <li><a href="#menus"><span class=secno>4.11.4 </span>The
+       <li><a href="#the-bb"><span class=secno>4.11.4 </span>The
+        <code>bb</code> element</a>
+        <ul class=toc>
+         <li><a href="#browser"><span class=secno>4.11.4.1. </span>Browser
+          button types</a>
+          <ul class=toc>
+           <li><a href="#the-make"><span class=secno>4.11.4.1.1. </span>The
+            <i>make application</i> state</a>
+          </ul>
+        </ul>
+
+       <li><a href="#menus"><span class=secno>4.11.5 </span>The
         <code>menu</code> element</a>
         <ul class=toc>
-         <li><a href="#menus-intro"><span class=secno>4.11.4.1.
+         <li><a href="#menus-intro"><span class=secno>4.11.5.1.
           </span>Introduction</a>
 
-         <li><a href="#building"><span class=secno>4.11.4.2. </span>Building
+         <li><a href="#building"><span class=secno>4.11.5.2. </span>Building
           menus and tool bars</a>
 
-         <li><a href="#context"><span class=secno>4.11.4.3. </span>Context
+         <li><a href="#context"><span class=secno>4.11.5.3. </span>Context
           menus</a>
 
-         <li><a href="#toolbars"><span class=secno>4.11.4.4.
+         <li><a href="#toolbars"><span class=secno>4.11.5.4.
           </span>Toolbars</a>
         </ul>
 
-       <li><a href="#commands"><span class=secno>4.11.5 </span>Commands</a>
+       <li><a href="#commands"><span class=secno>4.11.6 </span>Commands</a>
         <ul class=toc>
-         <li><a href="#using"><span class=secno>4.11.5.1. </span>Using the
+         <li><a href="#using"><span class=secno>4.11.6.1. </span>Using the
           <code>a</code> element to define a command</a>
 
-         <li><a href="#using0"><span class=secno>4.11.5.2. </span>Using the
+         <li><a href="#using0"><span class=secno>4.11.6.2. </span>Using the
           <code>button</code> element to define a command</a>
 
-         <li><a href="#using1"><span class=secno>4.11.5.3. </span>Using the
+         <li><a href="#using1"><span class=secno>4.11.6.3. </span>Using the
           <code>input</code> element to define a command</a>
 
-         <li><a href="#using2"><span class=secno>4.11.5.4. </span>Using the
+         <li><a href="#using2"><span class=secno>4.11.6.4. </span>Using the
           <code>option</code> element to define a command</a>
 
-         <li><a href="#using3"><span class=secno>4.11.5.5. </span>Using the
+         <li><a href="#using3"><span class=secno>4.11.6.5. </span>Using the
           <code>command</code> element to define a command</a>
         </ul>
       </ul>
@@ -1149,7 +1160,7 @@
         </span>Notifications</a>
       </ul>
 
-     <li><a href="#browser"><span class=secno>5.6 </span>Browser state</a>
+     <li><a href="#browser0"><span class=secno>5.6 </span>Browser state</a>
       <ul class=toc>
        <li><a href="#custom-handlers"><span class=secno>5.6.1 </span>Custom
         protocol and content handlers</a>
@@ -1194,7 +1205,7 @@
        <li><a href="#application"><span class=secno>5.7.6 </span>Application
         cache API</a>
 
-       <li><a href="#browser0"><span class=secno>5.7.7 </span>Browser
+       <li><a href="#browser1"><span class=secno>5.7.7 </span>Browser
         state</a>
       </ul>
 
@@ -12203,7 +12214,7 @@
    <dd><code title=attr-hyperlink-hreflang><a
     href="#hreflang3">hreflang</a></code>
 
-   <dd><code title=attr-hyperlink-type><a href="#type18">type</a></code>
+   <dd><code title=attr-hyperlink-type><a href="#type20">type</a></code>
 
    <dt>DOM interface:
 
@@ -12239,7 +12250,7 @@
    href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a
    href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a
    href="#hreflang3">hreflang</a></code>, and <code
-   title=attr-hyperlink-type><a href="#type18">type</a></code> attributes
+   title=attr-hyperlink-type><a href="#type20">type</a></code> attributes
    must be omitted if the <code title=attr-hyperlink-href><a
    href="#href6">href</a></code> attribute is not present.
 
@@ -12268,7 +12279,7 @@
    href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a
    href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a
    href="#hreflang3">hreflang</a></code>, and <code
-   title=attr-hyperlink-type><a href="#type18">type</a></code> attributes may
+   title=attr-hyperlink-type><a href="#type20">type</a></code> attributes may
    be used to indicate to the user the likely nature of the target resource
    before the user follows the link.
 
@@ -22375,7 +22386,7 @@
    <dd><code title=attr-hyperlink-hreflang><a
     href="#hreflang3">hreflang</a></code>
 
-   <dd><code title=attr-hyperlink-type><a href="#type18">type</a></code>
+   <dd><code title=attr-hyperlink-type><a href="#type20">type</a></code>
 
    <dt>DOM interface:
 
@@ -22534,7 +22545,7 @@
    href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a
    href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a
    href="#hreflang3">hreflang</a></code>, and <code
-   title=attr-hyperlink-type><a href="#type18">type</a></code> attributes may
+   title=attr-hyperlink-type><a href="#type20">type</a></code> attributes may
    be used to indicate to the user the likely nature of the target resource
    before the user follows the link.
 
@@ -22544,7 +22555,7 @@
    href="#rel3">rel</a></code>, <code title=attr-hyperlink-media><a
    href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a
    href="#hreflang3">hreflang</a></code>, and <code
-   title=attr-hyperlink-type><a href="#type18">type</a></code> attributes
+   title=attr-hyperlink-type><a href="#type20">type</a></code> attributes
    must be omitted if the <code title=attr-hyperlink-href><a
    href="#href6">href</a></code> attribute is not present.
 
@@ -27944,7 +27955,7 @@
    href="#boolean0">boolean attribute</a> that, if present, indicates that
    the command is not available in the current state.
 
-  <p class=note>The distinction between <a href="#disabled6"
+  <p class=note>The distinction between <a href="#disabled7"
    title=command-facet-DisabledState>Disabled State</a> and <a
    href="#hidden1" title=command-facet-HiddenState>Hidden State</a> is
    subtle. A command should be Disabled if, in the same context, it could be
@@ -28057,7 +28068,196 @@
   <p class=note><code><a href="#command0">command</a></code> elements are not
    rendered unless they <a href="#menu" title=menu>form part of a menu</a>.
 
-  <h4 id=menus><span class=secno>4.11.4 </span>The <dfn
+  <h4 id=the-bb><span class=secno>4.11.4 </span>The <dfn
+   id=bb><code>bb</code></dfn> element</h4>
+
+  <dl class=element>
+   <dt>Categories
+
+   <dd><a href="#phrasing0">Phrasing content</a>.
+
+   <dd><a href="#interactive1">Interactive content</a>.
+
+   <dt>Contexts in which this element may be used:
+
+   <dd>Where <a href="#phrasing0">phrasing content</a> is expected.
+
+   <dt><a href="#phrasing0">Phrasing content</a>.
+
+   <dd>Empty.
+
+   <dt>Element-specific attributes:
+
+   <dd><code title=attr-command-type><a href="#type13">type</a></code>
+
+   <dt>DOM interface:
+
+   <dd>
+    <pre
+     class=idl>interface <dfn id=htmlcommandelement0>HTMLCommandElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
+           attribute DOMString <a href="#type14" title=dom-command-type>type</a>;
+  readonly attribute boolean <span title=dom-command-supported>supported</span>;
+  readonly attribute boolean <a href="#disabled5" title=dom-command-disabled>disabled</a>;
+};</pre>
+
+    <p>The <code title=command-ro><a href="#command2">Command</a></code>
+     interface must also be implemented by this element.</p>
+  </dl>
+
+  <p>The <code><a href="#bb">bb</a></code> element represents a user agent
+   command that the user can invoke.
+
+  <p>The <dfn id=type15 title=attr-bb-type><code>type</code></dfn> attribute
+   indicates the kind of command. The <code title=attr-bb-type><a
+   href="#type15">type</a></code> attribute is an <a
+   href="#enumerated">enumerated attribute</a>. The following table lists the
+   keywords and states for the attribute — the keywords in the left
+   column map to the states listed in the cell in the second column on the
+   same row as the keyword.
+
+  <table>
+   <thead>
+    <tr>
+     <th> Keyword
+
+     <th> State
+
+   <tbody>
+    <tr>
+     <td> <dfn id=makeapp
+      title=attr-bb-type-makeapp><code>makeapp</code></dfn>
+
+     <td> <i title=attr-bb-type-makeapp-state><a
+      href="#make-application">make application</a></i>
+  </table>
+
+  <p>The <span>missing value default</span> state is the <i
+   title=attr-bb-type-null-state><a href="#null">null</a></i> state.
+
+  <p>Each state has an <i>action</i> and a <i>relevance</i>, defined in the
+   following sections.
+
+  <p>When the attribute is in the <dfn id=null
+   title=attr-bb-type-null-state><i>null</i></dfn> state, the <i>action</i>
+   is to not do anything, and the <i>relevance</i> is unconditionally false.
+
+  <p>A <code><a href="#bb">bb</a></code> element whose <code
+   title=attr-bb-type><a href="#type15">type</a></code> attribute is in a
+   state whose <i>relevance</i> is true must be enabled. Conversely, a
+   <code><a href="#bb">bb</a></code> element whose <code
+   title=attr-bb-type><a href="#type15">type</a></code> attribute is in a
+   state whose <i>relevance</i> is false must be disabled.
+
+  <p>If a <code><a href="#bb">bb</a></code> element is enabled, it must match
+   the <code title="">:enabled</code> pseudo-class; otherwise, it must match
+   the <code title="">:disabled</code> pseudo-class.
+
+  <p>User agents should allow users to invoke <code><a
+   href="#bb">bb</a></code> elements when they are enabled. When a user
+   invokes a <code><a href="#bb">bb</a></code> element, its <code
+   title=attr-bb-type><a href="#type15">type</a></code> attribute's state's
+   <i>action</i> must be invoked.
+
+  <p>When the element has no descendant element children and has no
+   descendant text node children of non-zero length, the element represents a
+   browser button with a user-agent-defined icon or text representing the
+   <code title=attr-bb-type><a href="#type15">type</a></code> attribute's
+   state's <i>action</i> and <i>relevance</i> (enabled vs disabled).
+   Otherwise, the element represents its descendants.
+
+  <p>The <dfn id=type16 title=dom-bb-type><code>type</code></dfn> DOM
+   attribute must <a href="#reflect">reflect</a> the content attribute of the
+   same name.
+
+  <p>The <dfn id=supported
+   title=dom-bb-supported><code>supported</code></dfn> DOM attribute must
+   return true if the <code title=attr-bb-type><a
+   href="#type15">type</a></code> attribute is in a state other than the <i
+   title=attr-bb-type-null-state><a href="#null">null</a></i> state and the
+   user agent supports that state's <i>action</i> (i.e. when the attribute's
+   value is one that the user agent recognises and supports), and false
+   otherwise.
+
+  <p>The <dfn id=disabled6 title=dom-bb-><code>disabled</code></dfn> DOM
+   attribute must return true if the element is disabled, and false otherwise
+   (i.e. it returns the opposite of the <code title=attr-bb-type><a
+   href="#type15">type</a></code> attribute's state's <i>relevance</i>).
+
+  <h5 id=browser><span class=secno>4.11.4.1. </span>Browser button types</h5>
+
+  <h6 id=the-make><span class=secno>4.11.4.1.1. </span>The <dfn
+   id=make-application title=attr-bb-type-makeapp-state><i>make
+   application</i></dfn> state</h6>
+
+  <p>Some user agents support making sites accessible as independent
+   applications, as if they were not Web sites at all. The <i
+   title=attr-bb-type-makeapp-state><a href="#make-application">make
+   application</a></i> state exists to allow Web pages to offer themselves to
+   the user as targets for this mode of operation.
+
+  <p>The <i>action</i> of the <i title=attr-bb-type-makeapp-state><a
+   href="#make-application">make application</a></i> state is to confirm the
+   user's intent to use the current site in a standalone fashion, and,
+   provided the user's intent is confirmed, offer the user a way to make the
+   resource identified by <span>the document's
+   address</span><!-- XXXDOCURL xref --> available in such a fashion.
+
+  <p>The <i>relevance</i> of the <i title=attr-bb-type-makeapp-state><a
+   href="#make-application">make application</a></i> state is false if the
+   user agent is already handling the site in such a fashion, or if the user
+   agent doesn't support making the site available in that fashion, and true
+   otherwise.
+
+  <div class=example>
+   <p>In the following example, a few links are listed on an application's
+    page, to allow the user perform certain actions, including making the
+    application standalone:</p>
+
+   <pre><menu>
+ <li><a href="settings.html" onclick="panels.show('settings')">Settings</a>
+ <li><bb type="makeapp">Download standalone application</a>
+ <li><a href="help.html" onclick="panels.show('help')">Help</a>
+ <li><a href="logout.html" onclick="panels.show('logout')">Sign out</a>
+</menu></pre>
+
+   <p>With the following stylesheet, it could be make to look like a single
+    line of text with vertical bars separating the options, with the "make
+    app" option disappearing when it's not supported or relevant:</p>
+
+   <pre>menu li { display: none}
+menu li:enabled { display: inline; }
+menu li:not(:first-child)::before { content: ' | '; }</pre>
+
+   <p>This could look like this:</p>
+
+   <p><img
+    alt=""Settings | Download standalone application | Help | Sign out""
+    src="images/sample-makeapp.png"></p>
+  </div>
+
+  <div class=example>
+   <p>The following example shows another way to do the same thing as the
+    previous one, this time not relying on CSS support to hide the "make app"
+    link if it doesn't apply:</p>
+
+   <pre><menu>
+ <a href="settings.html" onclick="panels.show('settings')">Settings</a> |
+ <bb type="makeapp" id="makeapp"></bb>
+ <a href="help.html" onclick="panels.show('help')">Help</a> |
+ <a href="logout.html" onclick="panels.show('logout')">Sign out</a>
+</menu>
+<script>
+ var bb = document.getElementById('makeapp');
+ if (bb.supported && bb.enabled) {
+   bb.parentNode.nextSibling.textContent = ' | ';
+   bb.textContent = 'Download standalone application';
+ } else {
+   bb.parentNode.removeChild(bb);
+ }
+</script></pre>
+  </div>
+
+  <h4 id=menus><span class=secno>4.11.5 </span>The <dfn
    id=menu><code>menu</code></dfn> element</h4>
 
   <dl class=element>
@@ -28083,7 +28283,7 @@
 
    <dt>Element-specific attributes:
 
-   <dd><code title=attr-menu-type><a href="#type15">type</a></code>
+   <dd><code title=attr-menu-type><a href="#type17">type</a></code>
 
    <dd><code title=attr-menu-label><a href="#label1">label</a></code>
 
@@ -28095,7 +28295,7 @@
    <dd>
     <pre
      class=idl>interface <dfn id=htmlmenuelement>HTMLMenuElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
-           attribute DOMString <a href="#type16" title=dom-menu-type>type</a>;
+           attribute DOMString <a href="#type18" title=dom-menu-type>type</a>;
            attribute DOMString <a href="#label2" title=dom-menu-label>label</a>;
            attribute boolean <a href="#autosubmit0" title=dom-menu-autosubmit>autosubmit</a>;
 };</pre>
@@ -28104,7 +28304,7 @@
   <p>The <code><a href="#menu">menu</a></code> element represents a list of
    commands.
 
-  <p>The <dfn id=type15 title=attr-menu-type><code>type</code></dfn>
+  <p>The <dfn id=type17 title=attr-menu-type><code>type</code></dfn>
    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
@@ -28119,19 +28319,19 @@
    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
+   title=attr-menu-type><a href="#type17">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
+   title=attr-menu-type><a href="#type17">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
+   title=attr-menu-type><a href="#type17">type</a></code> attribute is in the
    <a href="#list" title="list state">list</a> state, then the element 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
@@ -28166,13 +28366,13 @@
    the UA must invoke the <code title=dom-form-submit>submit()</code> method
    of the <code>form</code> element indicated by that DOM attribute.
 
-  <p>The <dfn id=type16 title=dom-menu-type><code>type</code></dfn>, <dfn
+  <p>The <dfn id=type18 title=dom-menu-type><code>type</code></dfn>, <dfn
    id=label2 title=dom-menu-label><code>label</code></dfn>, and <dfn
    id=autosubmit0 title=dom-menu-autosubmit><code>autosubmit</code></dfn> DOM
    attributes must <a href="#reflect">reflect</a> the content attributes of
    the same name.
 
-  <h5 id=menus-intro><span class=secno>4.11.4.1. </span>Introduction</h5>
+  <h5 id=menus-intro><span class=secno>4.11.5.1. </span>Introduction</h5>
 
   <p><em>This section is non-normative.</em>
 
@@ -28270,7 +28470,7 @@
 
 -->
 
-  <h5 id=building><span class=secno>4.11.4.2. </span><dfn
+  <h5 id=building><span class=secno>4.11.5.2. </span><dfn
    id=building0>Building menus and tool bars</dfn></h5>
 
   <p>A menu (or tool bar) consists of a list of zero or more of the following
@@ -28364,7 +28564,7 @@
    <li>Any separator at the start or end of the menu must be removed.
   </ol>
 
-  <h5 id=context><span class=secno>4.11.4.3. </span><dfn id=context2>Context
+  <h5 id=context><span class=secno>4.11.5.3. </span><dfn id=context2>Context
    menus</dfn></h5>
 
   <p>The <dfn id=contextmenu
@@ -28435,13 +28635,13 @@
    href="#reflect">reflect</a> the <code title=attr-contextmenu><a
    href="#contextmenu">contextmenu</a></code> content attribute.
 
-  <h5 id=toolbars><span class=secno>4.11.4.4. </span>Toolbars</h5>
+  <h5 id=toolbars><span class=secno>4.11.5.4. </span>Toolbars</h5>
 
   <p><dfn id=toolbars0>Toolbars</dfn> are a kind of menu that is always
    visible.
 
   <p>When 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
+   title=attr-menu-type><a href="#type17">type</a></code> attribute with the
    value <code title="">toolbar</code>, then the user agent must <a
    href="#building0" title="building menus and tool bars">build</a> the menu
    for that <code><a href="#menu">menu</a></code> element and <span
@@ -28452,7 +28652,7 @@
   <p>The user agent must reflect changes made to the <code><a
    href="#menu">menu</a></code>'s DOM immediately in the UI.
 
-  <h4 id=commands><span class=secno>4.11.5 </span>Commands</h4>
+  <h4 id=commands><span class=secno>4.11.6 </span>Commands</h4>
 
   <p>A <dfn id=command1 title=concept-command>command</dfn> is the
    abstraction behind menu items, buttons, and links. Once a command is
@@ -28463,7 +28663,7 @@
   <p id=facets>Commands are defined to have the following <em>facets</em>:
 
   <dl>
-   <dt><dfn id=type17 title=command-facet-Type>Type</dfn>
+   <dt><dfn id=type19 title=command-facet-Type>Type</dfn>
 
    <dd>The kind of command: "command", meaning it is a normal command;
     "radio", meaning that triggering the command will, amongst other things,
@@ -28499,12 +28699,12 @@
    <dd>Whether the command is hidden or not (basically, whether it should be
     shown in menus).
 
-   <dt><dfn id=disabled6 title=command-facet-DisabledState>Disabled
+   <dt><dfn id=disabled7 title=command-facet-DisabledState>Disabled
     State</dfn>
 
    <dd>Whether the command can be triggered or not. If the <a href="#hidden1"
     title=command-facet-HiddenState>Hidden State</a> is true (hidden) then
-    the <a href="#disabled6" title=command-facet-DisabledState>Disabled
+    the <a href="#disabled7" title=command-facet-DisabledState>Disabled
     State</a> will be true (disabled) regardless. <span class=issue>We could
     make this into a string value that acts as a Hint for why the command is
     disabled.</span>
@@ -28546,7 +28746,7 @@
   readonly attribute DOMString <a href="#title7" title=dom-command-ro-title>title</a>;
   readonly attribute DOMString <a href="#icon2" title=dom-command-ro-icon>icon</a>;
   readonly attribute boolean <a href="#hidden2" title=dom-command-ro-hidden>hidden</a>;
-  readonly attribute boolean <a href="#disabled7" title=dom-command-ro-disabled>disabled</a>;              
+  readonly attribute boolean <a href="#disabled8" title=dom-command-ro-disabled>disabled</a>;              
   readonly attribute boolean <a href="#checked3" title=dom-command-ro-checked>checked</a>;              
   void <a href="#click0" title=dom-command-ro-click>click</a>();
   readonly attribute <a href="#htmlcollection0">HTMLCollection</a> <a href="#triggers0" title=dom-command-ro-triggers>triggers</a>;
@@ -28568,7 +28768,7 @@
    title=dom-command-ro-commandType><code>commandType</code></dfn> attribute
    must return a string whose value is either "<code
    title="">command</code>", "<code title="">radio</code>", or "<code
-   title="">checked</code>", depending on whether the <a href="#type17"
+   title="">checked</code>", depending on whether the <a href="#type19"
    title=command-facet-Type>Type</a> of the command defined by the element is
    "command", "radio", or "checked" respectively. If the element does not
    define a command, it must return null.
@@ -28615,9 +28815,9 @@
    href="#hidden0">hidden</a></code> DOM attribute on <code><a
    href="#command0">command</a></code> elements.
 
-  <p>The <dfn id=disabled7
+  <p>The <dfn id=disabled8
    title=dom-command-ro-disabled><code>disabled</code></dfn> attribute must
-   return true if the command's <a href="#disabled6"
+   return true if the command's <a href="#disabled7"
    title=command-facet-DisabledState>Disabled State</a> is that the command
    is disabled, and false if the command is not disabled. This attribute is
    not affected by the command's <a href="#hidden1"
@@ -28666,14 +28866,14 @@
    href="#using7">option</a></code>, <code title=command-element><a
    href="#command3">command</a></code>.
 
-  <h5 id=using><span class=secno>4.11.5.1. </span><dfn id=using4
+  <h5 id=using><span class=secno>4.11.6.1. </span><dfn id=using4
    title=a-command>Using the <code>a</code> element to define a command</dfn></h5>
 
   <p>An <code><a href="#a">a</a></code> element with an <code
    title=attr-hyperlink-href><a href="#href6">href</a></code> attribute <a
    href="#command1" title=concept-command>defines a command</a>.
 
-  <p>The <a href="#type17" title=command-facet-Type>Type</a> of the command
+  <p>The <a href="#type19" title=command-facet-Type>Type</a> of the command
    is "command".
 
   <p>The <a href="#id1" title=command-facet-ID>ID</a> of the command is the
@@ -28700,7 +28900,7 @@
    for the command.
 
   <p>The <a href="#hidden1" title=command-facet-HiddenState>Hidden State</a>
-   and <a href="#disabled6" title=command-facet-DisabledState>Disabled
+   and <a href="#disabled7" title=command-facet-DisabledState>Disabled
    State</a> facets of the command are always false. (The command is always
    enabled.)
 
@@ -28711,14 +28911,14 @@
    command is to <a href="#firing" title="fire a click event">fire a <code
    title="">click</code> event</a> at the element.
 
-  <h5 id=using0><span class=secno>4.11.5.2. </span><dfn id=using5
+  <h5 id=using0><span class=secno>4.11.6.2. </span><dfn id=using5
    title=button-command>Using the <code>button</code> element to define a
    command</dfn></h5>
 
   <p>A <code>button</code> element always <a href="#command1"
    title=concept-command>defines a command</a>.
 
-  <p>The <a href="#type17" title=command-facet-Type>Type</a>, <a href="#id1"
+  <p>The <a href="#type19" title=command-facet-Type>Type</a>, <a href="#id1"
    title=command-facet-ID>ID</a>, <a href="#label3"
    title=command-facet-Label>Label</a>, <a href="#hint"
    title=command-facet-Hint>Hint</a>, <a href="#icon1"
@@ -28729,7 +28929,7 @@
    <a href="#using4" title=a-command>as for <code>a</code> elements</a> (see
    the previous section).
 
-  <p>The <a href="#disabled6" title=command-facet-DisabledState>Disabled
+  <p>The <a href="#disabled7" title=command-facet-DisabledState>Disabled
    State</a> of the command mirrors the disabled state of the button.
    Typically this is given by the element's <code
    title=attr-button-disabled>disabled</code> attribute, but certain button
@@ -28737,7 +28937,7 @@
    <code>move-up</code> button type is disabled when it would have no
    effect).
 
-  <h5 id=using1><span class=secno>4.11.5.3. </span><dfn id=using6
+  <h5 id=using1><span class=secno>4.11.6.3. </span><dfn id=using6
    title=input-command>Using the <code>input</code> element to define a
    command</dfn></h5>
 
@@ -28748,7 +28948,7 @@
    <code>add</code>, and <code>remove</code> <a href="#command1"
    title=concept-command>defines a command</a>.
 
-  <p>The <a href="#type17" title=command-facet-Type>Type</a> of the command
+  <p>The <a href="#type19" title=command-facet-Type>Type</a> of the command
    is "radio" if the <code title=attr-input-type>type</code> attribute has
    the value <code>radio</code>, "checkbox" if the <code>type</code>
    attribute has the value <code>checkbox</code>, and "command" otherwise.
@@ -28761,13 +28961,13 @@
   <p>The <a href="#label3" title=command-facet-Label>Label</a> of the command
    depends on the Type of the command:
 
-  <p>If the <a href="#type17" title=command-facet-Type>Type</a> is "command",
+  <p>If the <a href="#type19" title=command-facet-Type>Type</a> is "command",
    then it is the string given by the <code
    title=attr-input-value>value</code> attribute, if any, and a
    <span>UA-dependent value</span><!-- XXX xref--> that the UA uses to label
    the button itself if the attribute is absent.
 
-  <p>Otherwise, the <a href="#type17" title=command-facet-Type>Type</a> is
+  <p>Otherwise, the <a href="#type19" title=command-facet-Type>Type</a> is
    "radio" or "checkbox". If the element has a <code>label</code> element
    associated with it, the <code><a
    href="#textcontent">textContent</a></code> of the first such element is
@@ -28790,7 +28990,7 @@
   <p>The <a href="#hidden1" title=command-facet-HiddenState>Hidden State</a>
    of the command is always false. (The command is never hidden.)
 
-  <p>The <a href="#disabled6" title=command-facet-DisabledState>Disabled
+  <p>The <a href="#disabled7" title=command-facet-DisabledState>Disabled
    State</a> of the command mirrors the disabled state of the control.
    Typically this is given by the element's <code
    title=attr-input-disabled>disabled</code> attribute, but certain input
@@ -28798,7 +28998,7 @@
    <code>move-up</code> input type is disabled when it would have no effect).
 
   <p>The <a href="#checked2" title=command-facet-CheckedState>Checked
-   State</a> of the command is true if the command is of <a href="#type17"
+   State</a> of the command is true if the command is of <a href="#type19"
    title=command-facet-Type>Type</a> "radio" or "checkbox" and the element
    has a <code title=attr-input-checked>checked</code> attribute, and false
    otherwise.
@@ -28810,7 +29010,7 @@
   is probably wrong for radio and checkbox types, depending on how we
   define <input>. -->
 
-  <h5 id=using2><span class=secno>4.11.5.4. </span><dfn id=using7
+  <h5 id=using2><span class=secno>4.11.6.4. </span><dfn id=using7
    title=option-command>Using the <code>option</code> element to define a
    command</dfn></h5>
 
@@ -28820,7 +29020,7 @@
    empty string <a href="#command1" title=concept-command>defines a
    command</a>.
 
-  <p>The <a href="#type17" title=command-facet-Type>Type</a> of the command
+  <p>The <a href="#type19" title=command-facet-Type>Type</a> of the command
    is "radio" if the <code>option</code>'s nearest ancestor
    <code>select</code> element has no <code
    title=attr-select-multiple>multiple</code> attribute, and "checkbox" if it
@@ -28848,7 +29048,7 @@
   <p>The <a href="#hidden1" title=command-facet-HiddenState>Hidden State</a>
    of the command is always false. (The command is never hidden.)
 
-  <p>The <a href="#disabled6" title=command-facet-DisabledState>Disabled
+  <p>The <a href="#disabled7" title=command-facet-DisabledState>Disabled
    State</a> of the command is true (disabled) if the element has a <code
    title=attr-option-disabled>disabled</code> attribute, and false otherwise.
 
@@ -28858,8 +29058,8 @@
    otherwise.
 
   <p>The <a href="#action" title=command-facet-Action>Action</a> of the
-   command depends on its <a href="#type17"
-   title=command-facet-Type>Type</a>. If the command is of <a href="#type17"
+   command depends on its <a href="#type19"
+   title=command-facet-Type>Type</a>. If the command is of <a href="#type19"
    title=command-facet-Type>Type</a> "radio" then this must set the <code
    title=dom-option-selected>selected</code> DOM attribute of the
    <code>option</code> element to true, otherwise it must toggle the state of
@@ -28870,14 +29070,14 @@
    <code>select</code> element (if there is one), as if the selection had
    been changed directly.
 
-  <h5 id=using3><span class=secno>4.11.5.5. </span>Using the <dfn id=command3
+  <h5 id=using3><span class=secno>4.11.6.5. </span>Using the <dfn id=command3
    title=command-element><code>command</code></dfn> element to define a
    command</h5>
 
   <p>A <code><a href="#command0">command</a></code> element <a
    href="#command1" title=concept-command>defines a command</a>.
 
-  <p>The <a href="#type17" title=command-facet-Type>Type</a> of the command
+  <p>The <a href="#type19" title=command-facet-Type>Type</a> of the command
    is "radio" if the <code><a href="#command0">command</a></code>'s <code
    title=attr-command-type><a href="#type13">type</a></code> attribute is
    "<code>radio</code>", "checkbox" if the attribute's value is
@@ -28911,7 +29111,7 @@
    title=attr-command-hidden><a href="#hidden">hidden</a></code> attribute,
    and false otherwise.
 
-  <p>The <a href="#disabled6" title=command-facet-DisabledState>Disabled
+  <p>The <a href="#disabled7" title=command-facet-DisabledState>Disabled
    State</a> of the command is true (disabled) if the element has either a
    <code title=attr-command-disabled><a href="#disabled4">disabled</a></code>
    attribute or a <code title=attr-command-hidden><a
@@ -28925,7 +29125,7 @@
   <p>The <a href="#action" title=command-facet-Action>Action</a> of the
    command is to invoke the behavior described in the definition of the <code
    title=dom-command-click><a href="#click">click()</a></code> method of the
-   <code><a href="#htmlcommandelement">HTMLCommandElement</a></code>
+   <code><a href="#htmlcommandelement0">HTMLCommandElement</a></code>
    interface.</p>
   <!-- XXX update to
   point to dom-click when we remove dom-command-click -->
@@ -32160,7 +32360,7 @@
    brought to the user's attention, and the <var title="">onclick</var>
    callback should then be invoked.
 
-  <h3 id=browser><span class=secno>5.6 </span>Browser state</h3>
+  <h3 id=browser0><span class=secno>5.6 </span>Browser state</h3>
 
   <p>The <dfn id=navigator title=dom-navigator><code>navigator</code></dfn>
    attribute of the <code><a href="#window">Window</a></code> interface must
@@ -33906,7 +34106,7 @@
      href="#applicationcache">ApplicationCache</a></code> object.
   </dl>
 
-  <h4 id=browser0><span class=secno>5.7.7 </span>Browser state</h4>
+  <h4 id=browser1><span class=secno>5.7.7 </span>Browser state</h4>
 
   <p>The <dfn id=navigator.online
    title=dom-navigator-onLine><code>navigator.onLine</code></dfn> attribute
@@ -36499,12 +36699,12 @@
    must use only language information associated with the resource to
    determine its language, not metadata included in the link to the resource.
 
-  <p>The <dfn id=type18 title=attr-hyperlink-type><code>type</code></dfn>
+  <p>The <dfn id=type20 title=attr-hyperlink-type><code>type</code></dfn>
    attribute, if present, gives the MIME type of the linked resource. It is
    purely advisory. The value must be a valid MIME type, optionally with
    parameters. <a href="#refsRFC2046">[RFC2046]</a> User agents must not
    consider the <code title=attr-hyperlink-type><a
-   href="#type18">type</a></code> attribute authoritative — upon
+   href="#type20">type</a></code> attribute authoritative — upon
    fetching the resource, user agents must not use metadata included in the
    link to the resource to determine its type.
 
@@ -37022,7 +37222,7 @@
   <p>The nature of the referenced document is given by the <code
    title=attr-hyperlink-media><a href="#media12">media</a></code>, <code
    title=attr-hyperlink-hreflang><a href="#hreflang3">hreflang</a></code>,
-   and <code title=attr-hyperlink-type><a href="#type18">type</a></code>
+   and <code title=attr-hyperlink-type><a href="#type20">type</a></code>
    attributes.
 
   <p>If the <code title=rel-alternate><a
@@ -37040,14 +37240,14 @@
 
   <p>If the <code title=rel-alternate><a
    href="#alternate">alternate</a></code> keyword is used with the <code
-   title=attr-hyperlink-type><a href="#type18">type</a></code> attribute, it
+   title=attr-hyperlink-type><a href="#type20">type</a></code> attribute, it
    indicates that the referenced document is a reformulation of the current
    document in the specified format.
 
   <p>The <code title=attr-hyperlink-media><a
    href="#media12">media</a></code>, <code title=attr-hyperlink-hreflang><a
    href="#hreflang3">hreflang</a></code>, and <code
-   title=attr-hyperlink-type><a href="#type18">type</a></code> attributes can
+   title=attr-hyperlink-type><a href="#type20">type</a></code> attributes can
    be combined when specified with the <code title=rel-alternate><a
    href="#alternate">alternate</a></code> keyword.
 
@@ -37060,7 +37260,7 @@
 
   <p>If the <code title=rel-alternate><a
    href="#alternate">alternate</a></code> keyword is used with the <code
-   title=attr-hyperlink-type><a href="#type18">type</a></code> attribute set
+   title=attr-hyperlink-type><a href="#type20">type</a></code> attribute set
    to the value <code title="">application/rss+xml</code> or the value <code
    title="">application/atom+xml</code>, then the user agent must treat the
    link as it would if it had the <code title=rel-feed><a

Modified: source
===================================================================
--- source	2008-07-21 19:38:00 UTC (rev 1893)
+++ source	2008-07-22 01:00:16 UTC (rev 1894)
@@ -25378,6 +25378,8 @@
   <p class="big-issue">define drag and drop in datagrids; selectiondraggable, etc.</p>
 -->
 
+
+
   <h4 id="the-command">The <dfn><code>command</code></dfn> element</h4>
 
   <dl class="element">
@@ -25567,6 +25569,182 @@
   unless they <span title="menu">form part of a menu</span>.</p>
 
 
+
+  <h4>The <dfn><code>bb</code></dfn> element</h4>
+
+  <dl class="element">
+   <dt>Categories</dt>
+   <dd><span>Phrasing content</span>.</dd>
+   <dd><span>Interactive content</span>.</dd>
+   <dt>Contexts in which this element may be used:</dt>
+   <dd>Where <span>phrasing content</span> is expected.</dd>
+   <dt><span>Phrasing content</span>.</dt>
+   <dd>Empty.</dd>
+   <dt>Element-specific attributes:</dt>
+   <dd><code title="attr-command-type">type</code></dd>
+   <dt>DOM interface:</dt>
+   <dd>
+<pre class="idl">interface <dfn>HTMLCommandElement</dfn> : <span>HTMLElement</span> {
+           attribute DOMString <span title="dom-command-type">type</span>;
+  readonly attribute boolean <span title="dom-command-supported">supported</span>;
+  readonly attribute boolean <span title="dom-command-disabled">disabled</span>;
+};</pre>
+    <p>The <code title="command-ro">Command</code> interface must also
+    be implemented by this element.</p>
+   </dd>
+  </dl>
+
+  <p>The <code>bb</code> element represents a user agent command that
+  the user can invoke.</p>
+
+  <p>The <dfn title="attr-bb-type"><code>type</code></dfn> attribute
+  indicates the kind of command. The <code
+  title="attr-bb-type">type</code> attribute is an <span>enumerated
+  attribute</span>. The following table lists the keywords and states
+  for the attribute — the keywords in the left column map to the
+  states listed in the cell in the second column on the same row as
+  the keyword.</p>
+
+  <table>
+   <thead> <tr> <th> Keyword <th> State
+   <tbody>
+    <tr>
+     <td> <dfn title="attr-bb-type-makeapp"><code>makeapp</code></dfn>
+     <td> <i title="attr-bb-type-makeapp-state">make application</i>
+  </table>
+
+  <p>The <span>missing value default</span> state is the <i
+  title="attr-bb-type-null-state">null</i> state.</p>
+
+  <p>Each state has an <i>action</i> and a <i>relevance</i>, defined
+  in the following sections.</p>
+
+  <p>When the attribute is in the <dfn
+  title="attr-bb-type-null-state"><i>null</i></dfn> state, the
+  <i>action</i> is to not do anything, and the <i>relevance</i> is
+  unconditionally false.</p>
+
+  <p>A <code>bb</code> element whose <code
+  title="attr-bb-type">type</code> attribute is in a state whose
+  <i>relevance</i> is true must be enabled. Conversely, a
+  <code>bb</code> element whose <code title="attr-bb-type">type</code>
+  attribute is in a state whose <i>relevance</i> is false must be
+  disabled.</p>
+
+  <p>If a <code>bb</code> element is enabled, it must match the <code
+  title="">:enabled</code> pseudo-class; otherwise, it must match the
+  <code title="">:disabled</code> pseudo-class.</p>
+
+  <p>User agents should allow users to invoke <code>bb</code> elements
+  when they are enabled. When a user invokes a <code>bb</code>
+  element, its <code title="attr-bb-type">type</code> attribute's
+  state's <i>action</i> must be invoked.</p>
+
+  <p>When the element has no descendant element children and has no
+  descendant text node children of non-zero length, the element
+  represents a browser button with a user-agent-defined icon or text
+  representing the <code title="attr-bb-type">type</code> attribute's
+  state's <i>action</i> and <i>relevance</i> (enabled vs
+  disabled). Otherwise, the element represents its descendants.</p>
+
+  <p>The <dfn title="dom-bb-type"><code>type</code></dfn> DOM
+  attribute must <span>reflect</span> the content attribute of the
+  same name.</p>
+
+  <p>The <dfn title="dom-bb-supported"><code>supported</code></dfn>
+  DOM attribute must return true if the <code
+  title="attr-bb-type">type</code> attribute is in a state other than
+  the <i title="attr-bb-type-null-state">null</i> state and the user
+  agent supports that state's <i>action</i> (i.e. when the attribute's
+  value is one that the user agent recognises and supports), and false
+  otherwise.</p>
+
+  <p>The <dfn title="dom-bb-"><code>disabled</code></dfn> DOM
+  attribute must return true if the element is disabled, and false
+  otherwise (i.e. it returns the opposite of the <code
+  title="attr-bb-type">type</code> attribute's state's
+  <i>relevance</i>).</p>
+
+
+  <h5>Browser button types</h5>
+
+  <h6>The <dfn title="attr-bb-type-makeapp-state"><i>make application</i></dfn> state</h6>
+
+  <p>Some user agents support making sites accessible as independent
+  applications, as if they were not Web sites at all. The <i
+  title="attr-bb-type-makeapp-state">make application</i> state exists
+  to allow Web pages to offer themselves to the user as targets for
+  this mode of operation.</p>
+
+  <p>The <i>action</i> of the <i
+  title="attr-bb-type-makeapp-state">make application</i> state is to
+  confirm the user's intent to use the current site in a standalone
+  fashion, and, provided the user's intent is confirmed, offer the
+  user a way to make the resource identified by <span>the document's
+  address</span><!-- XXXDOCURL xref --> available in such a
+  fashion.</p>
+
+  <p>The <i>relevance</i> of the <i
+  title="attr-bb-type-makeapp-state">make application</i> state is
+  false if the user agent is already handling the site in such a
+  fashion, or if the user agent doesn't support making the site
+  available in that fashion, and true otherwise.</p>
+
+  <div class="example">
+
+   <p>In the following example, a few links are listed on an
+   application's page, to allow the user perform certain actions,
+   including making the application standalone:</p>
+
+   <pre><menu>
+ <li><a href="settings.html" onclick="panels.show('settings')">Settings</a>
+ <li><bb type="makeapp">Download standalone application</a>
+ <li><a href="help.html" onclick="panels.show('help')">Help</a>
+ <li><a href="logout.html" onclick="panels.show('logout')">Sign out</a>
+</menu></pre>
+
+   <p>With the following stylesheet, it could be make to look like a
+   single line of text with vertical bars separating the options, with
+   the "make app" option disappearing when it's not supported or
+   relevant:</p>
+
+   <pre>menu li { display: none}
+menu li:enabled { display: inline; }
+menu li:not(:first-child)::before { content: ' | '; }</pre>
+
+   <p>This could look like this:</p>
+
+   <p><img src="images/sample-makeapp.png" alt=""Settings | Download standalone application | Help | Sign out""></p>
+
+  </div>
+
+  <div class="example">
+
+   <p>The following example shows another way to do the same thing as
+   the previous one, this time not relying on CSS support to hide the
+   "make app" link if it doesn't apply:</p>
+
+   <pre><menu>
+ <a href="settings.html" onclick="panels.show('settings')">Settings</a> |
+ <bb type="makeapp" id="makeapp"></bb>
+ <a href="help.html" onclick="panels.show('help')">Help</a> |
+ <a href="logout.html" onclick="panels.show('logout')">Sign out</a>
+</menu>
+<script>
+ var bb = document.getElementById('makeapp');
+ if (bb.supported && bb.enabled) {
+   bb.parentNode.nextSibling.textContent = ' | ';
+   bb.textContent = 'Download standalone application';
+ } else {
+   bb.parentNode.removeChild(bb);
+ }
+</script></pre>
+
+  </div>
+
+
+
+
   <h4 id="menus">The <dfn><code>menu</code></dfn> element</h4>
 
   <dl class="element">




More information about the Commit-Watchers mailing list