third_party/js/mozmill/shared-modules/dom-utils.js
function DOMWalker_getNode(idSet) {
    var doc = this._controller.window.document;

    // QuerySelector seems to be unusuale for id's in this case:
    // https://developer.mozilla.org/En/Code_snippets/QuerySelector
    switch (idSet.getBy) {
      case DOMWalker.GET_BY_ID:
        return doc.getElementById(idSet[idSet.getBy]);
      case DOMWalker.GET_BY_SELECTOR:
        return doc.querySelector(idSet[idSet.getBy]);
      default:
        throw new Error("Not supported getBy-attribute: " + idSet.getBy);
    }
  }
function DOMWalker_getNode(idSet) {
    var doc = this._controller.window.document;

    // QuerySelector seems to be unusuale for id's in this case:
    // https://developer.mozilla.org/En/Code_snippets/QuerySelector
    switch (idSet.getBy) {
      case DOMWalker.GET_BY_ID:
        return doc.getElementById(idSet[idSet.getBy]);
      case DOMWalker.GET_BY_SELECTOR:
        return doc.querySelector(idSet[idSet.getBy]);
      default:
        throw new Error("Not supported getBy-attribute: " + idSet.getBy);
    }
  }
function DOMWalker_getNode ( idSet ) { var doc = this . _controller . window . document ; // QuerySelector seems to be unusuale for id's in this case: // https://developer.mozilla.org/En/Code_snippets/QuerySelector switch ( idSet . getBy ) { case DOMWalker . GET_BY_ID : return doc . getElementById ( idSet [ idSet . getBy ] ) ; case DOMWalker . GET_BY_SELECTOR : return doc . querySelector ( idSet [ idSet . getBy ] ) ; default : throw new Error ( "Not supported getBy-attribute: " + idSet . getBy ) ; } }
Retrieves and returns a wanted node based on the provided identification
set.

@param {array of objects} idSet
Contains informations on the elements to open while
Object-elements:  getBy         - attribute-name of the attribute
containing the identification
information for the opener-element
subContent    - array of ids of the opener-elements
in the window with the value of
the above getBy-attribute
target        - information, where the new
elements will be opened
[1|2|4]
title         - title of the opened dialog/window
waitFunction  - The function used as an argument
for MozmillController.waitFor to
wait before starting the walk.
[optional - default: no waiting]
windowHandler - Window instance
[only needed for some tests]

@returns Node
@type {Node}
Retrieves and returns a wanted node based on the provided identification set .