jsonp.js
No description.

File Location

/goog/net/jsonp.js

Classes

goog.net.Jsonp
Creates a new cross domain channel that sends data to the specified host URL. By default, if no reply arrives within 5s, the channel assumes the call failed to complete successfully.

Public Protected Private

Global Functions

goog.net.Jsonp.addPayloadToUri_(payloaduri) !goog.Uri
Returns URL encoded payload. The payload should be a map of name-value pairs, in the form {"foo": 1, "bar": true, ...}. If the map is empty, the URI will be unchanged.

The method uses hasOwnProperty() to assure the properties are on the object, not on its prototype.

Arguments:
payload : !Object
A map of value name pairs to be encoded. A value may be specified as an array, in which case a query parameter will be created for each value, e.g.: {"foo": [1,2]} will encode to "foo=1&foo=2".
uri : !goog.Uri
A Uri object onto which the payload key value pairs will be encoded.
Returns: !goog.Uri  A reference to the Uri sent as a parameter.
code »
goog.net.Jsonp.cleanup_(iddeleteReplyHandler)
Removes the script node and reply handler with the given id.
Arguments:
id : string
The id of the script node to be removed.
deleteReplyHandler : boolean
If true, delete the reply handler instead of setting it to nullFunction (if we know the callback could never be called again).
code »
goog.net.Jsonp.newErrorHandler_(idpayloadopt_errorCallback) !Function
Creates a timeout callback that calls the given timeoutCallback with the original payload.
Arguments:
id : string
The id of the script node.
payload : Object
The payload that was sent to the server.
opt_errorCallback : Function=
The function called on timeout.
Returns: !Function  A zero argument function that handles callback duties.
code »
goog.net.Jsonp.newReplyHandler_(idreplyCallback) !Function
Creates a reply callback that calls the given replyCallback with data returned by the server.
Arguments:
id : string
The id of the script node.
replyCallback : Function
The function called on reply.
Returns: !Function  A reply callback function.
code »

Directory net

File Reference