From dc8b70748fd4654debc9746ec12fe42e10b76510 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Tue, 9 Feb 2016 13:53:17 +0100 Subject: [PATCH] Fixed once() HFJ-1646 --- js/h5p-event-dispatcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/h5p-event-dispatcher.js b/js/h5p-event-dispatcher.js index 5300e6d..fb8dd66 100644 --- a/js/h5p-event-dispatcher.js +++ b/js/h5p-event-dispatcher.js @@ -139,8 +139,8 @@ H5P.EventDispatcher = (function () { } var once = function (event) { - self.off(event, once); - listener.apply(this, event); + self.off(event.type, once); + listener.call(this, event); }; self.on(type, once, thisArg);