X-Git-Url: https://scm.cri.mines-paristech.fr/git/ckeditor.git/blobdiff_plain/871bad8291b6dbc29d489d95d185458caab25158..b9e364c4c1d3654c6d27c73c114159295fbeda62:/skins/ckeditor/plugins/wsc/dialogs/ciframe.html diff --git a/skins/ckeditor/plugins/wsc/dialogs/ciframe.html b/skins/ckeditor/plugins/wsc/dialogs/ciframe.html index e174702..1d6ba5a 100644 --- a/skins/ckeditor/plugins/wsc/dialogs/ciframe.html +++ b/skins/ckeditor/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(); }