Skip to content

Commit fd13d91

Browse files
committed
use document.createElement to create image instead of Image constructor
1 parent a2d8cc6 commit fd13d91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/06-copy-to-clipboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
svg.appendChild(use)
4040
copy.appendChild(svg)
4141
} else { // img
42-
var img = new Image()
42+
var img = document.createElement('img')
4343
img.alt = 'copy icon'
4444
img.className = 'copy-icon'
4545
img.src = window.uiRootPath + '/img/octicons-16.svg#view-clippy'

0 commit comments

Comments
 (0)