X-Git-Url: https://scm.cri.mines-paristech.fr/git/ckeditor.git/blobdiff_plain/e11f66eb655db8339a2d9b197b89f6c3b26099e1..579f65bc95a773bc6f8da75f6849ea49f365368b:/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(); }