# Download Manager - Custom

**URL:** <https://discourse.mozilla.org/t/download-manager-custom/37393>\
**Category:** Development\
**Created:** [March 25, 2019, 5:51pm UTC](https://discourse.mozilla.org/t/download-manager-custom/37393 "2019-03-25T17:51:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shibi.ns](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@shibi.ns](https://discourse.mozilla.org/u/shibi.ns)\
**Post date:** [March 25, 2019, 5:51pm UTC](https://discourse.mozilla.org/t/download-manager-custom/37393/1 "2019-03-25T17:51:00Z")

</div>

I am trying implement a download manager using “[https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/downloads/download](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/downloads/download)” . One of my requirment is users able to download multiple files with single click and don’t force user to select the folder for each file .

I was trying to implement the download the example but it says browser is not defined . how do i get browser object . I am trying plain javascript .

I hope the this going to work on browsers except IE Edge

---

<div class="post-metadata">

**Author:** ![freaktechnik](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/freaktechnik/32/37766_2.png) [@freaktechnik](https://discourse.mozilla.org/u/freaktechnik)\
**Post date:** [March 25, 2019, 6:25pm UTC](https://discourse.mozilla.org/t/download-manager-custom/37393/2 "2019-03-25T18:25:20Z")

</div>

Where did you write this code? Because the browser object should be defined in just about every webextension context.

---

<div class="post-metadata">

**Author:** ![shibi.ns](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@shibi.ns](https://discourse.mozilla.org/u/shibi.ns)\
**Post date:** [March 26, 2019, 12:34am UTC](https://discourse.mozilla.org/t/download-manager-custom/37393/3 "2019-03-26T00:34:46Z")

</div>

Looks thats mistake i made . I thought this was pure java script code .

---

<div class="post-metadata">

**Author:** ![shibi.ns](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@shibi.ns](https://discourse.mozilla.org/u/shibi.ns)\
**Post date:** [March 26, 2019, 7:00pm UTC](https://discourse.mozilla.org/t/download-manager-custom/37393/4 "2019-03-26T19:00:29Z")

</div>

Do you have any idea how can we implement multi downloads without asking for each download using javascript
