Skip to content

Commit 9806041

Browse files
authored
Merge pull request #568 from micahjon/master
Add namespace to prevent conflict with Chrome Poper Blocker extension
2 parents b5e61ec + 0403f77 commit 9806041

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/FileSaver.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ var saveAs = _global.saveAs || (
8080
: ('download' in HTMLAnchorElement.prototype && !isMacOSWebView)
8181
? function saveAs (blob, name, opts) {
8282
var URL = _global.URL || _global.webkitURL
83-
var a = document.createElement('a')
83+
// Namespace is used to prevent conflict w/ Chrome Poper Blocker extension (Issue #561)
84+
var a = document.createElementNS('http://www.w3.org/1999/xhtml', 'a')
8485
name = name || blob.name || 'download'
8586

8687
a.download = name

0 commit comments

Comments
 (0)