How to create an Iframe widget that communicates with other elements?