Class pulp.createElement
Defined in: pulp.createElement.js.
Constructor
^ top
new pulp.createElement(tag [, properties={}], innerHTML,)
Create an element given the tag, properties and innerHTML, child node, or array of child nodes
- Parameters:
- {String} tag
- The tag name (Upper or lower case)
- {Object} properties Optional, Default: {}
- Properties to add to the node
- {String|HTMLElement|HTMLElement[]} innerHTML,
- child node, or array of child nodes
- Returns:
- {HTMLElement}
Method Summary
Method Detail
^ top
pulp.createElement.setAttribute(node, attr, The)
-> undefined
Set an attribute on a node
Parameters:
| {HTMLElement} | node | The node on which to set the element |
| {String} | attr | The attribute to set |
| {String|undefined|false|null} | The | value of the attribute. If not given, the attribute will be set to the atribute name. e.g. $E.setAttribute(el, 'checked') will set checked="checked" If false or null, the attribute is removed |
Returns:
| {undefined} |