mozilla

Revision 41777 of Elements

  • Revision slug: XBL/XBL_1.0_Reference/Elements
  • Revision title: Elements
  • Revision id: 41777
  • Created:
  • Creator: Tservo
  • Is current revision? No
  • Comment /* bindings */

Revision Content

bindings

<!ENTITY % bindings-content "(binding|script|stylesheet)*">
<!ELEMENT bindings %bindings-content;>
<!ATTLIST bindings
   id               ID           #IMPLIED
   type             CDATA        #IMPLIED
>

The bindings element is the root element of an XBL document. It contains zero or more binding elements as children. Each binding child element defines a unique binding that can be attached to elements in other documents. The bindings element can also contain script and stylesheet elements as children. These specify scripts and stylesheets that are used by the bindings.

<bindings xmlns="http://www.mozilla.org/xbl">
  <binding id="binding1">
    ...
  </binding>
  <binding id="binding2">
    ...
  </binding>
  ...
</bindings>
  • id - The id attribute is a document-unique identifier. The value of this identifier is often used to manipulate the element through a DOM interface (e.g., using document.getElementById).
  • type - The type attribute specifies the scripting language used by all bindings in the document. Bindings can selectively override this default by specifying type attributes of their own.

binding

content

children

element

implementation

method

parameter

body

property

getter

setter

handlers

handler

script

stylesheet

Revision Source

<p>
</p>
<h2 name="bindings">bindings</h2>
<pre>&lt;!ENTITY % bindings-content "(binding|script|stylesheet)*"&gt;
&lt;!ELEMENT bindings %bindings-content;&gt;
&lt;!ATTLIST bindings
   id               ID           #IMPLIED
   type             CDATA        #IMPLIED
&gt;
</pre>
<p>The <code>bindings</code> element is the root element of an XBL document. It contains zero or more <code>binding</code> elements as children. Each <code>binding</code> child element defines a unique binding that can be attached to elements in other documents. The <code>bindings</code> element can also contain <code>script</code> and <code>stylesheet</code> elements as children. These specify scripts and stylesheets that are used by the bindings.
</p>
<pre>&lt;bindings xmlns="http://www.mozilla.org/xbl"&gt;
  &lt;binding id="binding1"&gt;
    ...
  &lt;/binding&gt;
  &lt;binding id="binding2"&gt;
    ...
  &lt;/binding&gt;
  ...
&lt;/bindings&gt;
</pre>
<ul><li> <code><b>id</b></code> - The <code>id</code> attribute is a document-unique identifier. The value of this identifier is often used to manipulate the element through a DOM interface (e.g., using <code>document.getElementById</code>). 
</li><li> <code><b>type</b></code> - The <code>type</code> attribute specifies the scripting language used by all bindings in the document. Bindings can selectively override this default by specifying <code>type</code> attributes of their own.
</li></ul>
<h2 name="binding">binding</h2>
<h2 name="content">content</h2>
<h2 name="children">children</h2>
<h2 name="element">element</h2>
<h2 name="implementation">implementation</h2>
<h2 name="method">method</h2>
<h2 name="parameter">parameter</h2>
<h2 name="body">body</h2>
<h2 name="property">property</h2>
<h2 name="getter">getter</h2>
<h2 name="setter">setter</h2>
<h2 name="handlers">handlers</h2>
<h2 name="handler">handler</h2>
<h2 name="script">script</h2>
<h2 name="stylesheet">stylesheet</h2>
Revert to this revision