We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4a1b0c commit 0f299c7Copy full SHA for 0f299c7
src/createElement.ts
@@ -0,0 +1,7 @@
1
+export function createElement(tag: string, attributes: Record<string, string>) {
2
+ const el = document.createElement(tag)
3
+ for (const key in attributes)
4
+ el.setAttribute(key, attributes[key])
5
+
6
+ return el
7
+}
0 commit comments