web/assets/libs/ckeditor/4.6.7/plugins/ajax/plugin.js
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* global ActiveXObject */
/**
* @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* @fileOverview Defines the {@link CKEDITOR.ajax} object, which stores Ajax methods for
* data loading.
*/
( function() {
CKEDITOR.plugins.add( 'ajax', {
requires: 'xml'
} );
/**
* Ajax methods for data loading.
*
* @class
* @singleton
*/
CKEDITOR.ajax = ( function() {
function createXMLHttpRequest() {
// In IE, using the native XMLHttpRequest for local files may throw
// "Access is Denied" errors.
if ( !CKEDITOR.env.ie || location.protocol != 'file:' ) {
try {
return new XMLHttpRequest();
} catch ( e ) {
}
}
try {
return new ActiveXObject( 'Msxml2.XMLHTTP' );
} catch ( e ) {}
try {
return new ActiveXObject( 'Microsoft.XMLHTTP' );
} catch ( e ) {}
return null;
}
function checkStatus( xhr ) {
// HTTP Status Codes:
// 2xx : Success
// 304 : Not Modified
// 0 : Returned when running locally (file://)
// 1223 : IE may change 204 to 1223 (see http://dev.jquery.com/ticket/1450)
return ( xhr.readyState == 4 && ( ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status === 0 || xhr.status == 1223 ) );
}
function getResponseText( xhr ) {
if ( checkStatus( xhr ) )
return xhr.responseText;
return null;
}
function getResponseXml( xhr ) {
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。