goog.ds.JsXmlHttpDataSource
Classgoog.ds.JsXmlHttpDataSource
> goog.ds.FastDataNode
> goog.ds.AbstractFastDataNode
> goog.ds.DataNodeList
> goog.ds.DataNode
goog.ds.JsXmlHttpDataSource(uri, name, opt_startText, opt_endText, opt_usePost)
Similar to JsonDataSource, with using XMLHttpRequest for transport Currently requires the result be a JS object that can be evaluated and set to a variable and doesn't require strict JSON notation.
uri
{string
|| goog.Uri
}
name
{string
}
opt_startText
{string
=}
opt_endText
{string
=}
opt_usePost
{boolean
=}
.add(value)
Inherited from goog.ds.FastDataNode
.
Adds a child to this data node.
value
{goog.ds.DataNode
}
.clone()
Inherited from goog.ds.FastDataNode
.
Creates a deep copy of this data node.
goog.ds.FastDataNode
}
.extendWith_(object)
[protected]Inherited from goog.ds.FastDataNode
.
Add all attributes of object to this data node.
object
{Object
}
.get(opt_key)
Inherited from goog.ds.FastDataNode
.
Gets the value of this data node (if called without opt_key) or gets a child node (if called with opt_key).
opt_key
{string
=}
.getByIndex(index)
Inherited from goog.ds.FastDataNode
.
Gets a child node by index. This method has a complexity of O(n) where n is the number of children. If you need a faster implementation of this method, you should use goog.ds.FastListNode.
index
{number
}
goog.ds.DataNode
}
.getChildNode(name, opt_create)
Inherited from goog.ds.FastDataNode
.
Get a child node by name.
name
{string
}
opt_create
{boolean
=}
goog.ds.DataNode
}
.getChildNodeValue(name)
Inherited from goog.ds.FastDataNode
.
Returns the value of a child node. By using this method you can avoid the need to create PrimitiveFastData nodes.
name
{string
}
Object
}
.getChildNodes()
Inherited from goog.ds.FastDataNode
.
.getCount()
Inherited from goog.ds.FastDataNode
.
Gets the number of child nodes. This method has a complexity of O(n) where n is the number of children. If you need a faster implementation of this method, you should use goog.ds.FastListNode.
number
}
.getDataName()
Inherited from goog.ds.AbstractFastDataNode
.
Return the name of this data node.
string
}
.getDataPath()
Inherited from goog.ds.AbstractFastDataNode
.
Get the path leading to this data node.
string
}
.getJsObject()
Inherited from goog.ds.FastDataNode
.
Returns a javascript object representation of this data node. You should not modify the object returned by this function.
Object
}
.getLoadState()
Gets the state of the backing data for this node
goog.ds.LoadState
}
.isList()
Inherited from goog.ds.FastDataNode
.
Returns whether this data node is a list. Always returns false for instances of FastDataNode but may return true for subclasses.
boolean
}
.load()
Load or reload the backing data for this node. Fires the JsonDataSource
.removeNode()
Inherited from goog.ds.FastDataNode
.
Removes a child node.
.set(value)
Inherited from goog.ds.FastDataNode
.
Not supported for normal FastDataNodes.
value
{*}
.setChildNode()
Inherited from goog.ds.FastDataNode
.
Sets a child node. Creates the child if it does not exist. Calling this function makes any child nodes previously obtained for name invalid. You should not use these child nodes but instead obtain a new instance by calling getChildNode.
.setDataName(value)
Inherited from goog.ds.AbstractFastDataNode
.
Set the name of this data node.
value
{string
}
.setNode(name, value)
Inherited from goog.ds.FastDataNode
.
Sets a child node.
name
{string
}
value
{Object
}
.setQueryData(data)
Sets the request data. This can be used if it is required to send a specific body rather than build the body from the query parameters. Only used in POST requests.
data
{string
}