兼容ie9
This commit is contained in:
parent
4a54a7455a
commit
0a59e69cb7
|
@ -1179,8 +1179,6 @@ var Nuclear = (function () {
|
|||
|
||||
})(Nuclear);
|
||||
|
||||
|
||||
|
||||
; (function ($) {
|
||||
var touch = {},
|
||||
touchTimeout, tapTimeout, swipeTimeout, longTapTimeout,
|
||||
|
@ -1343,7 +1341,41 @@ var Nuclear = (function () {
|
|||
})
|
||||
})(Nuclear)
|
||||
|
||||
; (function ($) {
|
||||
// __proto__ doesn't exist on IE<11, so redefine
|
||||
// the Z function to use object extension instead
|
||||
if (!('__proto__' in {})) {
|
||||
alert(11111)
|
||||
$.extend($.nuclear, {
|
||||
Z: function (dom, selector) {
|
||||
dom = dom || []
|
||||
$.extend(dom, $.fn)
|
||||
dom.selector = selector || ''
|
||||
dom.__Z = true
|
||||
return dom
|
||||
},
|
||||
// this is a kludge but works
|
||||
isZ: function (object) {
|
||||
return $.type(object) === 'array' && '__Z' in object
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// getComputedStyle shouldn't freak out when called
|
||||
// without a valid element as argument
|
||||
try {
|
||||
getComputedStyle(undefined)
|
||||
} catch (e) {
|
||||
var nativeGetComputedStyle = getComputedStyle;
|
||||
window.getComputedStyle = function (element) {
|
||||
try {
|
||||
return nativeGetComputedStyle(element)
|
||||
} catch (e) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
})(Nuclear)
|
||||
Nuclear.create = function (obj) {
|
||||
Nuclear._mixObj(obj);
|
||||
if (!obj.statics) obj.statics = {};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1160,8 +1160,6 @@ var Nuclear = (function () {
|
|||
|
||||
})(Nuclear);
|
||||
|
||||
|
||||
|
||||
; (function ($) {
|
||||
var touch = {},
|
||||
touchTimeout, tapTimeout, swipeTimeout, longTapTimeout,
|
||||
|
@ -1324,3 +1322,38 @@ var Nuclear = (function () {
|
|||
})
|
||||
})(Nuclear)
|
||||
|
||||
; (function ($) {
|
||||
// __proto__ doesn't exist on IE<11, so redefine
|
||||
// the Z function to use object extension instead
|
||||
if (!('__proto__' in {})) {
|
||||
alert(11111)
|
||||
$.extend($.nuclear, {
|
||||
Z: function (dom, selector) {
|
||||
dom = dom || []
|
||||
$.extend(dom, $.fn)
|
||||
dom.selector = selector || ''
|
||||
dom.__Z = true
|
||||
return dom
|
||||
},
|
||||
// this is a kludge but works
|
||||
isZ: function (object) {
|
||||
return $.type(object) === 'array' && '__Z' in object
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// getComputedStyle shouldn't freak out when called
|
||||
// without a valid element as argument
|
||||
try {
|
||||
getComputedStyle(undefined)
|
||||
} catch (e) {
|
||||
var nativeGetComputedStyle = getComputedStyle;
|
||||
window.getComputedStyle = function (element) {
|
||||
try {
|
||||
return nativeGetComputedStyle(element)
|
||||
} catch (e) {
|
||||
return null
|
||||
}
|
||||
}
|
||||
}
|
||||
})(Nuclear)
|
Loading…
Reference in New Issue