* Checks if `value` is a DOM element. * * @static * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. * @example * * _.isElement(document.body); * // =>
(value)
| 9954 | * // => false |
| 9955 | */ |
| 9956 | function isElement(value) { |
| 9957 | return !!value && value.nodeType === 1 && isObjectLike(value) && |
| 9958 | (objToString.call(value).indexOf('Element') > -1); |
| 9959 | } |
| 9960 | // Fallback for environments without DOM support. |
| 9961 | if (!support.dom) { |
| 9962 | isElement = function(value) { |
nothing calls this directly
no test coverage detected