Skip to content

Instantly share code, notes, and snippets.

View 1inguini's full-sized avatar
⚰️
existing is hard

1inguini

⚰️
existing is hard
View GitHub Profile
@KOBA789
KOBA789 / e.js
Created November 3, 2024 01:53
e.js
function E (tagName, attrs, children) {
const el = document.createElement(tagName);
attrs = attrs || {};
Object.keys(attrs).forEach(function (key) {
el.setAttribute(key, attrs[key]);
});
for (let child of children) {
if (child instanceof Node) {
el.appendChild(child);
} else {