Polyfills the a[download] attribute
npm install dwnld-attr-polyfillGitHub | NPM | @jelmerdemaat
Will polyfill the functionality of the download attribute:
``html`
↓ ↓ ↓
Download this (don't navigate to it)
in IE11, which doesn't support it. This polyfill is small and works fast.
Install using npm:
`sh`
npm i -S dwnld-attr-polyfill
And include it in your JavaScript somewhere:
`sh`
import 'dwnld-attr-polyfill';
This polyfill automatically does its work. It will:
1. Detect if polyfilling is needed (and otherwise won't do anything)
2. Detect on click if it's on a link with the download attributeXMLHttpRequest
3. Prevent their default behaviour
4. Via an , request the resource and create a blob of datamsSaveBlob
5. Instruct IE11 to download that data using
```
$ npm publish
npm ERR! 400 Bad Request - PUT https://registry.npmjs.org/download-attr-polyfill - That word is not allowed. Please contact support (support@npmjs.com) if you believe you received this in error.