MCPcopy
hub / github.com/Semantic-Org/Semantic-UI / isElement

Function isElement

test/helpers/sinon.js:94–103  ·  view source on GitHub ↗

* @name samsam.isElement * @param Object object * * Returns ``true`` if ``object`` is a DOM element node. Unlike * Underscore.js/lodash, this function will return ``false`` if ``object`` * is an *element-like* object, i.e. a regular object with a ``nodeType`` * property

(object)

Source from the content-addressed store, hash-verified

92 * property that holds the value ``1``.
93 */
94 function isElement(object) {
95 if (!object || object.nodeType !== 1 || !div) { return false; }
96 try {
97 object.appendChild(div);
98 object.removeChild(div);
99 } catch (e) {
100 return false;
101 }
102 return true;
103 }
104
105 /**
106 * @name samsam.keys

Callers 2

deepEqualCyclicFunction · 0.85
sinon.jsFile · 0.85

Calls 1

isDOMNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…