X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=plugins%2Fwsc%2Fdialogs%2Fciframe.html;h=8e4e6bc9a5329f7fdea8937a2c1cc206b428d249;hb=HEAD;hp=8f10175e5be4f4c504055306ba56e12aaaee18e3;hpb=a272c66d841421f8bf933c16535bdcde1c4649fc;p=ckeditor.git diff --git a/plugins/wsc/dialogs/ciframe.html b/plugins/wsc/dialogs/ciframe.html index 8f10175..8e4e6bc 100644 --- a/plugins/wsc/dialogs/ciframe.html +++ b/plugins/wsc/dialogs/ciframe.html @@ -1,6 +1,6 @@ @@ -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(); }