MCPcopy Create free account
hub / github.com/TruthHun/BookStack / query

Function query

static/vuejs/vue.common.js:4366–4379  ·  view source on GitHub ↗

* Query an element selector if it's not an element already.

(el)

Source from the content-addressed store, hash-verified

4364 * Query an element selector if it's not an element already.
4365 */
4366function query (el) {
4367 if (typeof el === 'string') {
4368 var selected = document.querySelector(el);
4369 if (!selected) {
4370 process.env.NODE_ENV !== 'production' && warn(
4371 'Cannot find element: ' + el
4372 );
4373 return document.createElement('div')
4374 }
4375 return selected
4376 } else {
4377 return el
4378 }
4379}
4380
4381/* */
4382

Callers 1

vue.common.jsFile · 0.70

Calls 1

warnFunction · 0.50

Tested by

no test coverage detected