diff options
Diffstat (limited to 'uploader/static/js/utils.js')
-rw-r--r-- | uploader/static/js/utils.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/uploader/static/js/utils.js b/uploader/static/js/utils.js new file mode 100644 index 0000000..045dd47 --- /dev/null +++ b/uploader/static/js/utils.js @@ -0,0 +1,10 @@ +function remove_children(element) { + Array.from(element.children).forEach(child => { + element.removeChild(child); + }); +} + +function trigger_change_event(element) { + evt = new Event("change"); + element.dispatchEvent(evt); +} |