diff options
Diffstat (limited to 'web-ui/app/js/monkey_patching/post_message.js')
-rw-r--r-- | web-ui/app/js/monkey_patching/post_message.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/web-ui/app/js/monkey_patching/post_message.js b/web-ui/app/js/monkey_patching/post_message.js new file mode 100644 index 00000000..87576900 --- /dev/null +++ b/web-ui/app/js/monkey_patching/post_message.js @@ -0,0 +1,16 @@ +/* + * origin window.postMessage fails with non serializable objects, so we fallback to console.log to do the job + */ +(function () { + 'use strict'; + + var originalPostMessage = window.postMessage; + window.postMessage = function(a, b) { + try { + originalPostMessage(a, b); + } catch (e) { + console.log(a, b); + } + }; + +}()); |