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

Function query

static/vuejs/vue.esm.js:4364–4377  ·  view source on GitHub ↗

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

(el)

Source from the content-addressed store, hash-verified

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

Callers 1

vue.esm.jsFile · 0.70

Calls 1

warnFunction · 0.50

Tested by

no test coverage detected