mirror of
https://github.com/multipleofnpm/qthtml.git
synced 2026-01-13 16:17:56 +00:00
11 lines
344 B
JavaScript
11 lines
344 B
JavaScript
export const $ = (selector) =>
|
|
{
|
|
const el = document.querySelector(selector)
|
|
el.render = (html) => el.innerHTML = html
|
|
el.inject = (html) => el.insertAdjacentHTML('beforeend', html)
|
|
return el;
|
|
};
|
|
|
|
export const $$ = (selector) => return document.querySelectorAll(selector)
|
|
export const _ = msg => console.log(msg); // _('hello')
|