Open a channel of communications between plugins and main UI

The plugin api provides a lot of features which makes it possible to augment the main UI, but not a lot of features to actually interact with it. I attempted to solve a relatively trivial problem which required interaction with the main UI and wrote two plugins taking entirely different approaches and neither could fully realize the vision with what’s in place today.

One possible solution would be to open a channel of communication between the main UI and the plugin nestled in its iframe. The postMessage api provides a safe, sandboxed way of making declarative requests and get meaningful responses.

Right now, the difficulty is that plugins cannot easily know what’s been rendered on the main UI and so writing plugins which in any way attempt to coordinate with the main UI is problematic.