Skip to content

Commit 3546ad6

Browse files
committed
Condensed create.elem() ↞ [auto-sync from https://github.com/KudoAI/chatgpt.js-chrome-starter]
1 parent 9153251 commit 3546ad6

File tree

1 file changed

+1
-1
lines changed
  • starters/chrome/extension/lib

1 file changed

+1
-1
lines changed

starters/chrome/extension/lib/dom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ window.dom = {
22
create: {
33
elem(elemType, attrs = {}) {
44
const elem = document.createElement(elemType)
5-
Object.entries(attrs).forEach(([attr, val]) => elem.setAttribute(attr, val))
5+
for (const attr in attrs) elem.setAttribute(attr, attrs[attr])
66
return elem
77
},
88

0 commit comments

Comments
 (0)