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

Function query

static/vuejs/vue.js:4360–4373  ·  view source on GitHub ↗

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

(el)

Source from the content-addressed store, hash-verified

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

Callers 1

vue.jsFile · 0.70

Calls 1

warnFunction · 0.50

Tested by

no test coverage detected