Binding

Declares a binding. The id attribute is used to identify a binding and refer to it within a style sheet via the -moz-binding property. The same binding can be used to attach to any number of elements.

For example the following style property will refer to a binding with an id of dropbox:

  -moz-binding: url ('chrome://myapp/skin/mybindings.xml#dropbox');  

A binding element may contain an content tag, an implementation tag, an handlers tag and an resources tag.

More information about binding

バインディングを宣言する。 id 属性は、バインディングを識別し、スタイルシート内から -moz-binding プロパティにより参照するために利用される。同じバインディングをいくつもの要素へ貼付けることができる。

例えば次のスタイルプロパティは、dropbox の id を持つバインディングを参照する。

  -moz-binding: url ('chrome://myapp/skin/mybindings.xml#dropbox');  

binding 要素は以下のタグを含むかもしれません。 contentimplementationhandlersresources

binding の追加情報


属性:

display

Type: string

This attribute specifies how the tag is displayed. By setting this attribute, you can have an element have the layout and display characteristics of an existing element. For example, use the value 'xul:button' to create an element that is displayed like a button. The part before the colon is a namespace prefix so you must declare the XUL namespace as well. Not all tags have a unique display type. The following XUL display types may be used: browser, button, checkbox, description, editor, grippy, iframe, image, label, menu, menuitem, menubar, progressmeter, radio, resizer, scrollbar, scrollbox, spacer, splitter, titlebar, treechildren and treecol. You may also use a number of HTML, MathML and SVG tags.

型 : 文字列

この属性では、どのようにタグが表示されるかを指定する。この属性を設定すれば、既にある要素のレイアウトや表示特性を持つ要素を持つことができる。例えば button のように表示される要素を作るには、'xul:button' という値を使う。コロンの前の部分は名前空間プリフィクスで、同様に XUL 名前空間を宣言しなければならない。全てのタグが、ユニークな display 型を持つわけではない。次の XUL display 型を使うことができる。browser, button, checkbox, description, editor, grippy, iframe, image, label, menu, menuitem, menubar, progressmeter, radio, resizer, scrollbar, scrollbox, spacer, splitter, titlebar, treechildren and treecol. HTML、MathML、SVG の多数のタグを使うこともできる。

extends

Type: binding URL

Bindings may inherit content, properties, methods and event handlers from other bindings. The binding will have the content and implementation of the parent binding as well as any defined by itself. The extends attribute should be set to the URI of the binding that it is inheriting from.

Type: binding URL

バインディングは他のバインディングから内容、プロパティ、メソッド、イベントハンドラを継承できる。バインディングは自分に定義されたものと同様に、親のバインディングの内容と実装を持つ。extends 属性には、継承するバインディングの URI を設定しなければならない。

id

Type: string

A unique identifier so that you can identify the binding with.

型 : 文字列

binding を識別できるユニークな識別子。

inheritstyle

Type: boolean

If this attribute is set to true, the content in the binding will inherit style rules from the document the element the binding is bound to. This means that the stylesheets for the XUL document will affect the content inside the binding. If this attribute is false, document stylesheets do not affect the appearance of the binding content. The default value of this attribute is true.

型 : boolean

この属性が true のときは、binding の内容は binding が結びつけられたドキュメント要素からスタイルルールを継承する。これは XUL 文書の stylesheet は、binding の内側の内容に影響する、ということである。この属性が false のときは、ドキュメントの stylesheet はバインディング内容に影響しない。この属性のデフォルト値は true である。


Copyright (C) 1999 - 2004 XulPlanet.com