B2G/gecko/browser/devtools/webconsole/PropertyPanel.jsm
/**
 * Creates a DOMNode and sets all the attributes of aAttributes on the created
 * element.
 *
 * @param nsIDOMDocument aDocument
 *        Document to create the new DOMNode.
 * @param string aTag
 *        Name of the tag for the DOMNode.
 * @param object aAttributes
 *        Attributes set on the created DOMNode.
 * @returns nsIDOMNode
 */
Creates a DOMNode and sets all the attributes of aAttributes on the created
element.

@param nsIDOMDocument aDocument
Document to create the new DOMNode.
@param string aTag
Name of the tag for the DOMNode.
@param object aAttributes
Attributes set on the created DOMNode.
Creates a DOMNode and sets all the attributes of aAttributes on the created element . @param nsIDOMDocument aDocument Document to create the new DOMNode . @param string aTag Name of the tag for the DOMNode . @param object aAttributes Attributes set on the created DOMNode .
function createElement(aDocument, aTag, aAttributes)
{
  let node = aDocument.createElement(aTag);
  for (var attr in aAttributes) {
    node.setAttribute(attr, aAttributes[attr]);
  }
  return node;
}
function createElement ( aDocument , aTag , aAttributes ) { let node = aDocument . createElement ( aTag ) ; for ( var attr in aAttributes ) { node . setAttribute ( attr , aAttributes [ attr ] ) ; } return node ; }
Creates a DOMNode and sets all the attributes of aAttributes on the created
 element.
Creates a DOMNode and sets all the attributes of aAttributes on the created element .