dont send messages if not an iframe

This commit is contained in:
j 2014-09-24 00:00:00 +02:00
parent 4a2751839f
commit baeeff366e

View file

@ -185,7 +185,9 @@
};
that.postMessage = function() {
return Ox.Message.post.apply(this, Ox.slice(arguments));
if (window !== window.top) {
return Ox.Message.post.apply(this, arguments);
}
};
that.triggerMessage = function() {
@ -272,8 +274,8 @@
// posting to parent, but not yet initialized
setTimeout(function() {
that.post.apply(Ox.parent, args);
}, 25);
}
}, 250);
} else {
Ox.forEach(
Ox.makeObject(Ox.slice(args)),
function(data, event) {
@ -284,6 +286,7 @@
}), '*');
}
);
}
};
that.trigger = function(self) {