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

Function query

static/vuejs/vue.runtime.common.js:4362–4375  ·  view source on GitHub ↗

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

(el)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

warnFunction · 0.50

Tested by

no test coverage detected