From 3aa8696ce693be6cb023da9c96e54d0cf5f198b3 Mon Sep 17 00:00:00 2001 From: Cameron Ball Date: Wed, 12 Oct 2016 13:10:30 +0800 Subject: [PATCH] MDL-56095 output: Properly set prototype on custom event for IE --- lib/javascript-static.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/javascript-static.js b/lib/javascript-static.js index dc56fe35d18..5cd262a9dbc 100644 --- a/lib/javascript-static.js +++ b/lib/javascript-static.js @@ -1322,8 +1322,9 @@ function updateProgressBar(id, percent, msg, estimate) { if (!(exception instanceof TypeError)) { throw exception; } - event = document.createEvent('Event'); + event = document.createEvent('CustomEvent'); event.initCustomEvent('update', false, true, eventData); + event.prototype = window.Event.prototype; } el.dispatchEvent(event);