xesite/static/js/xeact.min.js

2 lines
581 B
JavaScript
Raw Permalink Normal View History

const h=(e,t={},r=[])=>{let n=Object.assign(document.createElement(e),t);return Array.isArray(r)||(r=[r]),n.append(...r),n},t=e=>document.createTextNode(e),x=e=>{for(;e.lastChild;)e.removeChild(e.lastChild)},g=e=>document.getElementById(e),c=e=>document.getElementsByClassName(e),n=e=>document.getElementsByName(e),s=e=>Array.from(document.querySelectorAll(e)),u=(e="",t={})=>{let r=new URL(e,window.location.href);return Object.entries(t).forEach(e=>{var[t,e]=e;r.searchParams.set(t,e)}),r.toString()},r=e=>window.addEventListener("DOMContentLoaded",e);export{h,t,x,g,c,n,u,s,r};