SalesSystemOnline/ckeditor_3.6/ckeditor/_source/plugins/ajax/plugin.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

/**
 * @fileOverview Defines the {@link CKEDITOR.ajax} object, which holds ajax methods for
 *		data loading.
 */

(function()
{
	CKEDITOR.plugins.add( 'ajax',
		{
			requires : [ 'xml' ]
		});

	/**
	 * Ajax methods for data loading.
	 * @namespace
	 * @example
	 */
	CKEDITOR.ajax = (function()
	{
		var createXMLHttpRequest = function()
		{
			// 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;
		};

		var checkStatus = function( 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 ) );
		};

		var getResponseText = function( xhr )
		{
			if ( checkStatus( xhr ) )
				return xhr.responseText;
			return null;
		};

		var getResponseXml = function( xhr )
后面还有 92 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。