fix message controller

This commit is contained in:
rolux 2013-02-25 10:24:40 +05:30
parent c18220cb4f
commit c417226e18

View file

@ -43,8 +43,8 @@ Ox.Message = (function() {
@*/
that.post = function(target, event, data) {
target = target == Ox.$parent ? window.parent
: Ox.isElement(target[0]) ? target[0]
: $('#' + target)[0];
: Ox.isElement(target[0]) ? target[0].contentWindow
: $('#' + target)[0].contentWindow;
target.postMessage(JSON.stringify({
event: event,
data: data,