diff --git a/src/clientapi/native/Window.js b/src/clientapi/native/Window.js index 7d14409..b124a5a 100644 --- a/src/clientapi/native/Window.js +++ b/src/clientapi/native/Window.js @@ -14,24 +14,22 @@ * along with the Game Closure SDK. If not, see . */ -"use import"; - import lib.PubSub; -var _evts = new lib.PubSub(); +module.exports = new lib.PubSub(); window.open = window.open || window.setLocation; window.addEventListener = function (evtName, cb, isBubble) { - _evts.subscribe(evtName, window, cb); + module.exports.on(evtName, cb); } window.removeEventListener = function (evtName, cb, isBubble) { - _evts.unsubscribe(evtName, window, cb); + module.exports.removeListener(evtName, cb); } window.__fireEvent = function (name, evt) { - if (!evt) { evt = {}; } - evt.type = name; - _evts.publish(name, evt); + if (!evt) { evt = {}; } + evt.type = name; + module.exports.publish(name, evt); }