diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-09-03 16:48:03 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-10 15:28:16 +0200 |
commit | d5e6688072e345dd0e455b0832b4393994e9be7c (patch) | |
tree | 30c7d21085448a0a8ca193151aea811a1f253d16 /modules | |
parent | 88969529f18a7de7ef9699c0b0dde82e820f1d7b (diff) |
luci-base: luci.js: support registering request progress handlers
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/luci.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/luci.js b/modules/luci-base/htdocs/luci-static/resources/luci.js index 9d472dedc0..a9ddccf359 100644 --- a/modules/luci-base/htdocs/luci-static/resources/luci.js +++ b/modules/luci-base/htdocs/luci-static/resources/luci.js @@ -378,6 +378,9 @@ contenttype = opt.headers[header]; } + if ('progress' in opt && 'upload' in opt.xhr) + opt.xhr.upload.addEventListener('progress', opt.progress); + if (contenttype != null) opt.xhr.setRequestHeader('Content-Type', contenttype); |