Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

DOM Interfaces

 

DocumentXBL インタフェース

DocumentXBL インタフェースは、バインディングドキュメントを読み込んだり、取得したりするためのメソッドを含んでいます。このインタフェースは XBL をサポートする DOM ドキュメントによって実装されています。

IDL 定義

interface DocumentXBL {
  NodeList getAnonymousNodes(in Element elt);
  Element getAnonymousElementByAttribute(in Element elt,
                                         in DOMString attrName,
                                         in DOMString attrValue);
  /* 実装されていません
  void addBinding(in Element elt,
                  in DOMString bindingURL);
  void removeBinding(in Element elt,
                      in DOMString bindingURL);
  */

  Element getBindingParent(in Node node);
  Document loadBindingDocument(in DOMString documentURL);
};

メソッド

getAnonymousNodes

getAnonymousNodes メソッドは、指定された要素の全ての無名子要素を取得します。

  • 引数
    • elt - 無名子要素の取得対象となる要素。
  • 戻り値
    • NodeList - The return value of getAnonymousNodes is a NodeList that represents the anonymous children of an element after insertion points and element tags have been applied.This means that, depending on the details regarding the insertion points of the binding, it's possible that some non-anonymous nodes appear in the list. See "Not so anonymous nodes" on mozilla.dev.platform for some discussion about this.

getAnonymousElementByAttribute

The getAnonymousElementByAttribute methods retrieves an anonymous decendant with a specified attribute value. Typically used with an (arbitary) anonid attribute to retrieve a specific anonymous child in an XBL binding.

  • 引数
    • elt - The element to retrieve anonymous children for.
    • attrName - The attribute name to look up.
    • attrValue - The attribute value to match.
  • 戻り値
    • Element - The return value of getAnonymousElementByAttribute is an anonymous decendant of the given element with matching attribute name and value.

addBinding

実装されていません The addBinding method attaches the specified binding (and any bindings that the binding inherits from) to an element. This call is not necessarily synchronous. The binding may not be attached yet when the call completes. See here for more information.

  • 引数
    • elt - The element to attach a binding to.
    • bindingURL of type DOMString - A URI that specifies the location of a specific binding to attach.
  • 戻り値なし

removeBinding

実装されていません The removeBinding method detaches the specified binding (and any bindings that the binding inherits from explicitly using the extends attribute) from the element. See here for more information.

  • 引数
    • elt - The element to remove a binding from.
    • bindingURL of type DOMString - A URI that specifies the location of a specific binding to detach.
  • 戻り値なし

getBindingParent

The getBindingParent method is used to obtain the bound element with the binding attached that is responsible for the generation of the specified anonymous node. This method enables an author to determine the scope of any content node. When content at the document-level scope is passed in as an argument, the property's value is null.

  • 引数
    • node - The node for which the bound element responsible for generation is desired.
  • 戻り値
    • Element - The return value of getBindingParent is the element responsible for the given anonymous node.

loadBindingDocument

loadBindingDocument メソッドは特定のドキュメント (loadBindingDocument メソッドがその上で呼び出されるような) 内部で使うための指定のドキュメントを同期して得るために使うことができます。 得られたバインディングドキュメントは DOM を使ってプログラム的に修正することができます。 それに続くドキュメントの内部で要素に結びつけられたどのバインディングも修正されたバインディングドキュメントから構築されます。

  • 引数
    • documentURL of type DOMString - バインディングドキュメントの URL。
  • 戻り値
    • Document - loadBindingDocument の戻り値は、バインディングドキュメントで定義されたバインディングに結びつけるために呼び出したドキュメントによって使われたバインディングドキュメントです。

ドキュメントのタグと貢献者

タグ: 
 最終更新者: NozomiIto,