|
|
|
@ -14,19 +14,11 @@
|
|
|
|
|
|
|
|
|
|
(function( global, factory ) {
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
// 如果在CommonJS环境中(如Node.js),并且module.exports存在。
|
|
|
|
|
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
|
|
|
|
|
|
|
|
|
// 如果全局对象有document属性,则直接导出jQuery。
|
|
|
|
|
// 否则,导出一个函数,该函数在被调用时会检查是否存在document。
|
|
|
|
|
=======
|
|
|
|
|
// 如果在CommonJS环境中(如Node.js),并且module.exports存在
|
|
|
|
|
if ( typeof module === "object" && typeof module.exports === "object" ) {
|
|
|
|
|
|
|
|
|
|
// 如果全局对象有document属性,则直接导出jQuery
|
|
|
|
|
// 否则,导出一个函数,该函数在被调用时会检查是否存在document
|
|
|
|
|
>>>>>>> b037b89 (Changes)
|
|
|
|
|
module.exports = global.document ?
|
|
|
|
|
factory( global, true ) :
|
|
|
|
|
function( w ) {
|
|
|
|
@ -41,25 +33,20 @@
|
|
|
|
|
// 在非CommonJS环境中,直接调用factory函数
|
|
|
|
|
factory( global );
|
|
|
|
|
}
|
|
|
|
|
}(typeof window!== "undefined"? window : this, function( window, noGlobal ) {
|
|
|
|
|
|
|
|
|
|
}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
|
|
|
|
|
|
|
|
|
|
// 用于存储已删除的ID的数组
|
|
|
|
|
// 存储已删除ID的数组,用于后续相关逻辑(可能与DOM元素管理等有关)
|
|
|
|
|
var deletedIds = [];
|
|
|
|
|
|
|
|
|
|
// 获取全局的document对象
|
|
|
|
|
// 获取全局document对象,方便后续DOM操作
|
|
|
|
|
var document = window.document;
|
|
|
|
|
|
|
|
|
|
// 从deletedIds数组借用一些数组方法,用于后续操作
|
|
|
|
|
// 借用deletedIds数组的部分方法,便于后续直接调用
|
|
|
|
|
var slice = deletedIds.slice;
|
|
|
|
|
var concat = deletedIds.concat;
|
|
|
|
|
var push = deletedIds.push;
|
|
|
|
|
var indexOf = deletedIds.indexOf;
|
|
|
|
|
|
|
|
|
|
// 一个空对象,用于存储类名到类型的映射
|
|
|
|
|
// 用于类名与类型映射的空对象
|
|
|
|
|
var class2type = {};
|
|
|
|
|
|
|
|
|
|
// 获取class2type对象的toString方法
|
|
|
|
|
// 获取class2type的toString方法,用于类型判断等操作
|
|
|
|
|
var toString = class2type.toString;
|
|
|
|
|
|
|
|
|
|
// 获取class2type对象的hasOwnProperty方法
|
|
|
|
|