node-load.js revision 198c218799f6e6d660911602e6f8c5daf9b9337f
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington * Extended Node interface with a basic IO API.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * @module node
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * @submodule node-load
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington * The default IO complete handler.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington * @method _ioComplete
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * @protected
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * @param {String} code The response code.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * @param {Object} response The response object.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews * @param {Array} args An array containing the callback and selector
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian WellingtonY.Node.prototype._ioComplete = function(code, response, args) {
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington * Loads content from the given url and replaces the Node's
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington * existing content with it.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington * @method load
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington * @param {String} url The URL to load via XMLHttpRequest.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington * @param {String} selector An optional selector representing a subset of an HTML document to load.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington * @param {Function} callback An optional function to run after the content has been loaded.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian Wellington * of the content.
0b062f4990db5cc6db2fe3398926f71b92a67407Brian WellingtonY.Node.prototype.load = function(url, selector, callback) {