mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Bump to v3.10.0.
This commit is contained in:
26
support.js
26
support.js
@@ -1,7 +1,4 @@
|
||||
define(['./internal/root'], function(root) {
|
||||
|
||||
/** Used to detect DOM support. */
|
||||
var document = (document = root.window) ? document.document : null;
|
||||
define([], function() {
|
||||
|
||||
/**
|
||||
* An object environment feature flags.
|
||||
@@ -12,26 +9,5 @@ define(['./internal/root'], function(root) {
|
||||
*/
|
||||
var support = {};
|
||||
|
||||
(function(x) {
|
||||
var Ctor = function() { this.x = x; },
|
||||
object = { '0': x, 'length': x },
|
||||
props = [];
|
||||
|
||||
Ctor.prototype = { 'valueOf': x, 'y': x };
|
||||
for (var key in new Ctor) { props.push(key); }
|
||||
|
||||
/**
|
||||
* Detect if the DOM is supported.
|
||||
*
|
||||
* @memberOf _.support
|
||||
* @type boolean
|
||||
*/
|
||||
try {
|
||||
support.dom = document.createDocumentFragment().nodeType === 11;
|
||||
} catch(e) {
|
||||
support.dom = false;
|
||||
}
|
||||
}(1, 0));
|
||||
|
||||
return support;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user