MCPcopy
hub / github.com/mdbootstrap/TW-Elements / getElement

Function getElement

src/js/util/index.js:116–127  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

114};
115
116const getElement = (obj) => {
117 if (isElement(obj)) {
118 // it's a jQuery object or a node element
119 return obj.jquery ? obj[0] : obj;
120 }
121
122 if (typeof obj === "string" && obj.length > 0) {
123 return document.querySelector(obj);
124 }
125
126 return null;
127};
128
129const emulateTransitionEnd = (element, duration) => {
130 let called = false;

Callers 8

constructorMethod · 0.90
getInstanceMethod · 0.90
setElementContentMethod · 0.90
_getConfigMethod · 0.90
_createPopperMethod · 0.90
_getConfigMethod · 0.90
_getConfigMethod · 0.90
_getConfigMethod · 0.90

Calls 1

isElementFunction · 0.85

Tested by

no test coverage detected