Skip to content

Commit

Permalink
Made attrs arg of create.svgElem() optional to support attribute-…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Feb 2, 2025
1 parent ddf3959 commit 0612128
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion chromium/extension/lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ window.dom = {
return style
},

svgElem(type, attrs) {
svgElem(type, attrs = {}) {
const elem = document.createElementNS('http://www.w3.org/2000/svg', type)
for (const attr in attrs) elem.setAttributeNS(null, attr, attrs[attr])
return elem
Expand Down
2 changes: 1 addition & 1 deletion firefox/extension/lib/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ window.dom = {
return style
},

svgElem(type, attrs) {
svgElem(type, attrs = {}) {
const elem = document.createElementNS('http://www.w3.org/2000/svg', type)
for (const attr in attrs) elem.setAttributeNS(null, attr, attrs[attr])
return elem
Expand Down

0 comments on commit 0612128

Please sign in to comment.