Bump version to 0.3.0 and add ontop method to $. Improve code consistency in index.js.

This commit is contained in:
sss
2025-06-05 15:24:29 -07:00
parent 70698d20cd
commit cf3aaca28a
3 changed files with 6 additions and 5 deletions

View File

@@ -1,10 +1,11 @@
export const $ = (selector) =>
const $ = (selector) =>
{
const el = document.querySelector(selector)
el.render = (html) => el.innerHTML = html
el.inject = (html) => el.insertAdjacentHTML('beforeend', html)
el.ontop = (html) => el.insertAdjacentHTML('beforebegin', html)
return el;
};
export const $$ = (selector) => return document.querySelectorAll(selector)
export const _ = msg => console.log(msg); // _('hello')
const $$ = (selector) => { return document.querySelectorAll(selector)}
const _ = msg => console.log(msg); // _('hello')