JQuery
view release on metacpan or search on metacpan
lib/JQuery/jquery_js/jquery/jquery-latest.js view on Meta::CPAN
var xmlRes = xml.getResponseHeader("Last-Modified");
// Firefox always returns 200. check Last-Modified date
return xml.status == 304 || xmlRes == jQuery.lastModified[url] ||
jQuery.browser.safari && xml.status == undefined;
} catch(e){}
return false;
},
/* Get the data out of an XMLHttpRequest.
* Return parsed XML if content-type header is "xml" and type is "xml" or omitted,
* otherwise return plain text.
* (String) data - The type of data that you're expecting back,
* (e.g. "xml", "html", "script")
*/
httpData: function( r, type ) {
var ct = r.getResponseHeader("content-type");
var data = !type && ct && ct.indexOf("xml") >= 0;
data = type == "xml" || data ? r.responseXML : r.responseText;
// If the type is "script", eval it in global context
if ( type == "script" )
jQuery.globalEval( data );
// Get the JavaScript object, if JSON is used.
if ( type == "json" )
eval( "data = " + data );
lib/JQuery/jquery_js/plugins/taconite/jquery.taconite.js view on Meta::CPAN
* @param Document|String command document
*/
$.taconite = $.xmlExec = function(xml) { $.taconite.impl.process(xml); }
$.taconite.version = [2,0,9]; // major,minor,point revision nums
$.taconite.debug = 0; // set to true to enable debug logging to Firebug
$.taconite.lastTime = 0; // processing time for most recent document
$.taconite._httpData = $.httpData; // original jQuery httpData function
// auto-detection method (replaces jQuery's httpData method when auto-detection is enabled)
$.httpData = $.taconite.detect = function(xhr, type) {
var ct = xhr.getResponseHeader('content-type');
$.taconite.log('[AJAX response] content-type: ', ct, '; status: ', xhr.status, ' ', xhr.statusText, '; has responseXML: ', xhr.responseXML != null);
var data = $.taconite._httpData(xhr, type); // call original method
if (data && data.documentElement) {
var root = data.documentElement.tagName;
$.taconite.log('XML document root: ', root);
if (root == 'taconite') {
$.taconite.log('taconite command document detected');
$.taconite(data);
}
}
else $.taconite.log('httpData: response is not XML (or not "valid" XML)');
( run in 0.612 second using v1.01-cache-2.11-cpan-524268b4103 )