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

Function query

static/vuejs/vue.runtime.js:4356–4369  ·  view source on GitHub ↗

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

(el)

Source from the content-addressed store, hash-verified

4354 * Query an element selector if it's not an element already.
4355 */
4356function query (el) {
4357 if (typeof el === 'string') {
4358 var selected = document.querySelector(el);
4359 if (!selected) {
4360 "development" !== 'production' && warn(
4361 'Cannot find element: ' + el
4362 );
4363 return document.createElement('div')
4364 }
4365 return selected
4366 } else {
4367 return el
4368 }
4369}
4370
4371/* */
4372

Callers 1

vue.runtime.jsFile · 0.70

Calls 1

warnFunction · 0.50

Tested by

no test coverage detected