X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=blobdiff_plain;f=plugins%2Fwsc%2Fdialogs%2Fciframe.html;h=1d6ba5a29d8b2563f1eb93b5f34a688486857f3b;hp=292297d70e2c3360c966d7d705376d367a67840f;hb=749be886bb4b0ebf70be13397f2279d5446cd0c8;hpb=9b6ca941425f97c9d5103a30101a7ac805cf675d diff --git a/plugins/wsc/dialogs/ciframe.html b/plugins/wsc/dialogs/ciframe.html index 292297d..1d6ba5a 100644 --- a/plugins/wsc/dialogs/ciframe.html +++ b/plugins/wsc/dialogs/ciframe.html @@ -38,9 +38,26 @@ function sendData2Master() catch (e) {} } +function OnMessage (event) { + var message = event.data; + var destination = window.parent.parent; + destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ; +} + +function listenPostMessage() { + if (window.addEventListener) { // all browsers except IE before version 9 + window.addEventListener ("message", OnMessage, false); + }else { + if (window.attachEvent) { // IE before version 9 + window.attachEvent("onmessage", OnMessage); + } + } +} + function onLoad() { interval = window.setInterval( sendData2Master, 100 ); + listenPostMessage(); }