Skip to content

Commit 0403f77

Browse files
committed
Add namespace to <a> tag to prevent conflict with Chrome Poper
Blocker extension Fixes issue #561
1 parent 1bc9ed3 commit 0403f77

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
@@ -75,7 +75,8 @@ var saveAs = _global.saveAs || (
7575
: 'download' in HTMLAnchorElement.prototype
7676
? function saveAs (blob, name, opts) {
7777
var URL = _global.URL || _global.webkitURL
78-
var a = document.createElement('a')
78+
// Namespace is used to prevent conflict w/ Chrome Poper Blocker extension (Issue #561)
79+
var a = document.createElementNS('http://www.w3.org/1999/xhtml', 'a')
7980
name = name || blob.name || 'download'
8081

8182
a.download = name

0 commit comments

Comments
 (0)