message listener which listens for messages from child objects to (this) parent.
handles string-encoded JSON messages with {widgetId: id, height: x} and handles changing child object height from its declared height -
- the child object is marked up as data-widget-id="{widgetId}" in the HTML element
- this ID is passed to the child somehow, typically via iframe URL so it can take it pass it back:
- Like this: <iframe src="http://source.of/child/page?widgetId={widgetId}" data-widget-id="{widgetId}"></iframe>
- Example: <iframe src="http://source.of/child/page?widgetId=chart2" data-widget-id="chart2"></iframe>