$instance
|
AMLElement
|
Finds corresponding to the HTML DOM element in the Ample SDK DOM. |
Sytaxis:
object.$instance(oElement) Arguments:
Name |
Type |
O/R |
Description |
oElement |
HTMLElement |
Required |
DOM HTML element |
|
addEventListener *
|
Void |
This method allows the registration of an event listener in the default group and, depending on the useCapture parameter, on the capture phase of the DOM event flow or its target and bubbling phases. |
Sytaxis:
object.addEventListener(sType, fListener, bUseCapture) Arguments:
Name |
Type |
O/R |
Description |
sType |
String |
Required |
Specifies the Event.type associated with the event for which the user is registering. |
fListener |
Function |
Required |
Function to be called when the event occurs. |
bUseCapture |
Boolean |
Required |
If true, user wishes to add the event listener for the capture phase only, if false - for target and bubbling phases. |
|
appendChild *
|
AMLNode
|
Appends a child element to the object. |
Sytaxis:
object.appendChild(oElement) Arguments:
Name |
Type |
O/R |
Description |
oElement |
AMLNode
|
Required |
The node to add. |
|
canDispatch *
|
Void |
Tests wether event of the specified namespace and type can be dispatched. |
Sytaxis:
object.canDispatch(sNameSpaceURI, sType) Arguments:
Name |
Type |
O/R |
Description |
sNameSpaceURI |
String |
Required |
NamespaceURI of the event to be tested. |
sType |
String |
Required |
Event type. |
|
cloneNode *
|
AMLNode
|
Creates a copy of node and returns it. |
Sytaxis:
object.cloneNode(bDeep) Arguments:
Name |
Type |
O/R |
Description |
bDeep |
Boolean |
Required |
Indicates wether the childnodes are also to be cloned. |
|
close
|
Void |
Closes Ample SDK fragment. This method can only be called while page is loading. |
Sytaxis:
object.close()
|
compareDocumentPosition *
|
Number |
Compares the reference node, i.e. the node on which this method is being called, with a node, i.e. the one passed as a parameter, with regard to their position in the document and according to the document order. |
Sytaxis:
object.compareDocumentPosition(oNode) Arguments:
Name |
Type |
O/R |
Description |
oNode |
AMLNode
|
Required |
The node to compare against the reference node. |
|
createAttribute
|
AMLAttr
|
Creates an Attr of the given name. |
Sytaxis:
object.createAttribute(sName) Arguments:
Name |
Type |
O/R |
Description |
sName |
String |
Required |
The name of the attribute. |
|
createAttributeNS
|
AMLAttr
|
Creates an attribute of the given qualified name and namespace URI. |
Sytaxis:
object.createAttributeNS(sNameSpaceURI, sQualifiedName) Arguments:
Name |
Type |
O/R |
Description |
sNameSpaceURI |
String |
Required |
Namespace of the attribute to be created. |
sQualifiedName |
String |
Required |
Attr's qualified name to be created. |
|
createCDATASection
|
AMLCDATASection
|
Creates a AMLCDATASection node whose value is the specified string.
|
Sytaxis:
object.createCDATASection(sData) Arguments:
Name |
Type |
O/R |
Description |
sData |
String |
Required |
The data for the node. |
|
createDocumentFragment
|
AMLDocumentFragment
|
Creates an empty DocumentFragment object. |
Sytaxis:
object.createDocumentFragment()
|
createElement
|
AMLElement
|
Creates an element of the type specified. |
Sytaxis:
object.createElement(sTagName) Arguments:
Name |
Type |
O/R |
Description |
sTagName |
String |
Required |
The name of the element type to instantiate |
|
createElementNS
|
AMLElement
|
Creates an element of the given qualified name and namespace URI. |
Sytaxis:
object.createElementNS(sNameSpaceURI, sQualifiedName) Arguments:
Name |
Type |
O/R |
Description |
sNameSpaceURI |
String |
Required |
Namespace of the element to be created. |
sQualifiedName |
String |
Required |
Element's qualified name to be created. |
|
createEntityReference
|
AMLEntityReference
|
Creates an EntityReference object. |
Sytaxis:
object.createEntityReference(sName) Arguments:
Name |
Type |
O/R |
Description |
sName |
String |
Required |
The name of the entity to reference. |
|
createEvent
|
AMLEvent
|
Creates an instance of the AMLEvent.
|
Sytaxis:
object.createEvent(sEventType) Arguments:
Name |
Type |
O/R |
Description |
sEventType |
String |
Required |
Type of event. |
|
createProcessingInstruction
|
AMLProcessingInstruction
|
Creates a ProcessingInstruction node given the specified name and data strings. |
Sytaxis:
object.createProcessingInstruction(sTarget, sData) Arguments:
Name |
Type |
O/R |
Description |
sTarget |
String |
Required |
The target part of the processing instruction. |
sData |
String |
Required |
The data for the node. |
|
createTextNode
|
AMLText
|
Creates a Text node given the specified string. |
Sytaxis:
object.createTextNode(sData) Arguments:
Name |
Type |
O/R |
Description |
sData |
String |
Required |
The data for the node. |
|
dispatchEvent *
|
Boolean |
This method allows the dispatch of events into the implementation's event model. Return value indicates whether any of the listeners which handled the event called preventDefault method on Event object. |
Sytaxis:
object.dispatchEvent(oEvent) Arguments:
Name |
Type |
O/R |
Description |
oEvent |
AMLEvent
|
Required |
The event to be dispatched. |
|
getElementById
|
AMLElement
|
Returns the Element that has an ID attribute with the given value. |
Sytaxis:
object.getElementById(sId) Arguments:
Name |
Type |
O/R |
Description |
sId |
String |
Required |
Element identifier |
|
getElementsByTagName
|
AMLNodeList
|
Returns a AMLNodeList of all the AMLElements in document order with a given tag name and are contained in the document.
|
Sytaxis:
object.getElementsByTagName(sTagName) Arguments:
Name |
Type |
O/R |
Description |
sTagName |
String |
Required |
Element tag name. |
|
getElementsByTagNameNS
|
AMLNodeList
|
Returns a AMLNodeList of all the AMLElements with a given local name and namespace URI in document order.
|
Sytaxis:
object.getElementsByTagNameNS(sNameSpaceURI, sLocalName) Arguments:
Name |
Type |
O/R |
Description |
sNameSpaceURI |
String |
Required |
Namespace URI. |
sLocalName |
String |
Required |
Local name. |
|
hasAttributes *
|
Boolean |
Retrieves true if the node has any attributes. |
Sytaxis:
object.hasAttributes()
|
hasChildNodes *
|
Boolean |
Returns a value that indicates whether the object has children. |
Sytaxis:
object.hasChildNodes()
|
importNode
|
AMLNode
|
Imports a node from another document to this document, without altering or removing the source node from the original document. |
Sytaxis:
object.importNode(oNode, bDeep) Arguments:
Name |
Type |
O/R |
Description |
oNode |
AMLNode
|
Required |
The node to import. |
bDeep |
Boolean |
Required |
If true, recursively import the subtree under the specified node; if false, import only the node itself |
|
insertBefore *
|
AMLNode
|
Inserts a chlid element after the specifyed element to the object. |
Sytaxis:
object.insertBefore(oElement, oBefore) Arguments:
Name |
Type |
O/R |
Description |
oElement |
AMLNode
|
Required |
The node to insert. |
oBefore |
AMLNode
|
Required |
The reference node, i.e., the node before which the new node must be inserted. |
|
isDefaultNamespace *
|
String |
This method checks if the specified namespaceURI is the default namespace or not. |
Sytaxis:
object.isDefaultNamespace(sNameSpaceURI) Arguments:
Name |
Type |
O/R |
Description |
sNameSpaceURI |
String |
Required |
The namespace URI to look for. |
|
lookupNamespaceURI *
|
String |
Look up the namespace URI associated to the given prefix, starting from this node. |
Sytaxis:
object.lookupNamespaceURI(sPrefix) Arguments:
Name |
Type |
O/R |
Description |
sPrefix |
String |
Required |
The prefix to look for. If this parameter is null, the method will return the default namespace URI if any. |
|
lookupPrefix *
|
String |
Look up the prefix associated to the given namespace URI, starting from this node. |
Sytaxis:
object.lookupPrefix(sNameSpaceURI) Arguments:
Name |
Type |
O/R |
Description |
sNameSpaceURI |
String |
Required |
The namespace URI to look for. |
|
normalize *
|
Void |
Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into a "normal" form |
Sytaxis:
object.normalize()
|
open
|
Void |
Opens Ample SDK fragment. This method can only be called while page is loading. |
Sytaxis:
object.open()
|
querySelector
|
AMLElement
|
Returns AMLElement that matches CSS query.
|
Sytaxis:
object.querySelector(sQuery, [fResolver]) Arguments:
Name |
Type |
O/R |
Description |
sQuery |
String |
Required |
CSS query. |
fResolver |
Function |
Optional |
Resolver function used to resolve namespace prefixes used in query. |
|
querySelectorAll
|
AMLNodeList
|
Returns AMLNodeList of AMLElement that match CSS query.
|
Sytaxis:
object.querySelectorAll(sQuery, [fResolver]) Arguments:
Name |
Type |
O/R |
Description |
sQuery |
String |
Required |
CSS query. |
fResolver |
Function |
Optional |
Resolver function used to resolve namespace prefixes used in query. |
|
removeChild *
|
AMLNode
|
Removes a child node from the object. |
Sytaxis:
object.removeChild(oChild) Arguments:
Name |
Type |
O/R |
Description |
oChild |
AMLNode
|
Required |
The node being removed. |
|
removeEventListener *
|
Void |
This method allows the removal of event listeners from the default group. |
Sytaxis:
object.removeEventListener(sType, fListener, bUseCapture) Arguments:
Name |
Type |
O/R |
Description |
sType |
String |
Required |
Specifies the Event.type for which the user registered the event listener. |
fListener |
Function |
Required |
Listener to be removed. |
bUseCapture |
Boolean |
Required |
Specifies whether the EventListener being removed was registered for the capture phase or not. |
|
replaceChild *
|
AMLNode
|
Replaces the given child node by another node. |
Sytaxis:
object.replaceChild(oNew, oChild) Arguments:
Name |
Type |
O/R |
Description |
oNew |
AMLNode
|
Required |
The new node to put in the child list. |
oChild |
AMLNode
|
Required |
The node being replaced in the list. |
|
toXML *
|
String |
Serializes Node to string. |
Sytaxis:
object.toXML()
|