fix pdf embed postMessage

This commit is contained in:
j 2013-02-24 09:38:56 +00:00
parent 7c3576c59b
commit da89475bad

View file

@ -3,6 +3,30 @@ Ox.Message.bind(function(event, data, oxid) {
//process messages here
}
});
Ox.$parent = {
postMessage: function(event, message) {
Ox.Message.post(event, message);
return this;
},
onMessage: function() {
var callback;
if (Ox.isObject(arguments[0])) {
Ox.forEach(arguments[0], function(callback, event) {
Ox.Message.bind(function(evt, data, oxid) {
if (Ox.isUndefined(oxid) && event == evt) {
callback(data);
}
});
});
} else {
callback = arguments[0];
Ox.Message.bind(function(event, data, oxid) {
Ox.isUndefined(oxid) && callback(event, data);
});
}
return this;
}
};
function getEmbedURL(id, videoURL) {
var parsed = Ox.parseURL(videoURL),