Namespace used to hold functions and other objects that extend JavaScript's DOM capabilities.
static createScript( Document doc, String contents, [ Object attributes]) : ScriptElementCreate a new script element with the specified content and attributes | Show Details | 1.0 | no |
Parameters | Document | doc | The DocumentElement to use when creating elements for the active document. | | String | contents | The text content for the script element. This value will be set via innerHTML once the new script element has been created | | Object | attributes | (optional)A list of attributes and attribute values to apply to the new ScriptElement. Each property name will become the attribute name and each property value will become that attributes value. Note that no escaping is done on the attributes values, so it is expected those values are valid attribute values. If this is omitted, a default type attribute will be used if set in Jaxer.Config.DEFAULT_EMITTED_SCRIPT_TYPE |
Returns | ScriptElement | The new script element with content and attributes applied. |
|
Convert an object's properties and property values into a string of attributes suitable for use in creating a string representation of an HTMLElement. Each property is used as the attribute name and each property value becomes the attribute value. Attribute values are surrounding in double-quotes and all property values containing double-quotes will have those characters escaped with backslashes. | Show Details | 1.0 | no |
Parameters | Object | hash | The source object |
Returns | String | The resulting string of attribute name/value pairs |
|
static insertScriptAfter( Object contents, Node elt, [ Object attributes]) : ScriptElementCreates a new script element and adds it as the next sibling of the specified element in the DOM. | Show Details | 1.0 | no |
Parameters | Object | contents | The text content for the script element. This value will be set via innerHTML once the new script element has been created | | Node | elt | The element in the DOM after which the new script element will be inserted | | Object | attributes | (optional)A list of attributes and attribute values to apply to the new ScriptElement. Each property name will become the attribute name and each property value will become that attributes value. Note that no escaping is done on the attributes values, so it is expected those values are valid attribute values |
Returns | ScriptElement | The new script element with content and attributes applied. |
|
Creates a new script element and adds it as the first child of a specified element in the DOM. | Show Details | 1.0 | no |
Parameters | Object | contents | The text content for the script element. This value will be set via innerHTML once the new script element has been created | | Node | elt | The element in the DOM where the new script element will be added as the element's first child. | | Object | attributes | (optional)A list of attributes and attribute values to apply to the new ScriptElement. Each property name will become the attribute name and each property value will become that attributes value. Note that no escaping is done on the attributes values, so it is expected those values are valid attribute values |
Returns | ScriptElement | The new script element with content and attributes applied. |
|
static insertScriptAtEnd( Object contents, Node elt, [ Object attributes]) : ScriptElementCreates a new script element and adds it as the last child of a specified element in the DOM. | Show Details | 1.0 | no |
Parameters | Object | contents | The text content for the script element. This value will be set via innerHTML once the new script element has been created | | Node | elt | The element in the DOM where the new script element will be added as the element's last child. | | Object | attributes | (optional)A list of attributes and attribute values to apply to the new ScriptElement. Each property name will become the attribute name and each property value will become that attributes value. Note that no escaping is done on the attributes values, so it is expected those values are valid attribute values |
Returns | ScriptElement | The new script element with content and attributes applied. |
|
Creates a new script element and adds it before a specified element in the DOM. | Show Details | 1.0 | no |
Parameters | Object | contents | The text content for the script element. This value will be set via innerHTML once the new script element has been created | | Node | elt | The element in the DOM before which the new script element will be inserted | | Object | attributes | (optional)A list of attributes and attribute values to apply to the new ScriptElement. Each property name will become the attribute name and each property value will become that attributes value. Note that no escaping is done on the attributes values, so it is expected those values are valid attribute values |
Returns | ScriptElement | The new script element with content and attributes applied. |
|
static replaceWithScript( Object contents, Node elt, [ Object attributes]) : ScriptElementReplace a specified element in the DOM with a new script element. | Show Details | 1.0 | no |
Parameters | Object | contents | The text content for the script element. This value will be set via innerHTML once the new script element has been created | | Node | elt | The element to replace with the a script element | | Object | attributes | (optional)A list of attributes and attribute values to apply to the new ScriptElement. Each property name will become the attribute name and each property value will become that attributes value. Note that no escaping is done on the attributes values, so it is expected those values are valid attribute values |
Returns | ScriptElement | The new script element with content and attributes applied. |
|
static toHTML( Node node) : StringReturns the serialized HTML of the given node and its contents, much like the outerHTML property in IE. You can also pass the entire document as the node to get the entire HTML of the document (page). | Show Details | 1.0 | no |
Parameters | Node | node | The HTML element or document (or DOM node) to be serialized |
Returns
|