notify widget - postMessage instead of window.parent

By Daniel Cuccia on 8 Dec 2016

Currently when using RichWidgets to spawn iframe modals, then calling the notify-widget action to invoke methods on the caller or to close said modals, it accomplishes this by going directly through window.parent. This works but makes the assumption that every web-screen will always be on the same domain, a very fatal assumption.

I propose this method of parental invocation to use postMessage instead of direct access through window.parent. window.parent.postMessage will not cause cross-domain exceptions, and should be easy enough to generate both sides of the method pragmatically.

This idea has no comments yet. Be the first to comment!