|
|
|
@ -212,9 +212,8 @@ define([
|
|
|
|
|
var modules = {};
|
|
|
|
|
funcs.makeUniversal = function (type, cfg) {
|
|
|
|
|
if (cfg && cfg.onEvent) {
|
|
|
|
|
modules[type] = {
|
|
|
|
|
onEvent: cfg.onEvent || function () {}
|
|
|
|
|
};
|
|
|
|
|
modules[type] = modules[type] || Util.mkEvent();
|
|
|
|
|
modules[type].reg(cfg.onEvent);
|
|
|
|
|
}
|
|
|
|
|
var sframeChan = funcs.getSframeChannel();
|
|
|
|
|
return {
|
|
|
|
@ -833,7 +832,7 @@ define([
|
|
|
|
|
ctx.sframeChan.on('EV_UNIVERSAL_EVENT', function (obj) {
|
|
|
|
|
var type = obj.type;
|
|
|
|
|
if (!type || !modules[type]) { return; }
|
|
|
|
|
modules[type].onEvent(obj.data);
|
|
|
|
|
modules[type].fire(obj.data);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
ctx.cache = Cache.create(ctx.sframeChan);
|
|
|
|
|