mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Bump to v3.10.0.
This commit is contained in:
26
support.js
26
support.js
@@ -1,8 +1,3 @@
|
||||
import root from './internal/root';
|
||||
|
||||
/** Used to detect DOM support. */
|
||||
var document = (document = root.window) ? document.document : null;
|
||||
|
||||
/**
|
||||
* An object environment feature flags.
|
||||
*
|
||||
@@ -12,25 +7,4 @@ var document = (document = root.window) ? document.document : null;
|
||||
*/
|
||||
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));
|
||||
|
||||
export default support;
|
||||
|
||||
Reference in New Issue
Block a user