function createElement(tagName, owner, opt_position, opt_size, opt_noAppend) {
  var element = ownerDocument(owner).createElement(tagName);
  if (opt_position) {
    setPosition(element, opt_position);
  }
  if (opt_size) {
    setSize(element, opt_size);
  }
  if (owner && !opt_noAppend) {
    appendChild(owner, element);
  }

  return element;
}
Creates a DOM element with the given tag name in the document of the
owner element.

@param {String} tagName  The name of the tag to create.
@param {Element} owner The intended owner (i.e., parent element) of
the created element.
@param {Point} opt_position  The top-left corner of the created element.
@param {Size} opt_size  The size of the created element.
@param {Boolean} opt_noAppend Do not append the new element to the owner.
@return {Element}  The newly created element node.