* Query an element selector if it's not an element already.
(el)
| 4362 | * Query an element selector if it's not an element already. |
| 4363 | */ |
| 4364 | function 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 |