As mentioned at https://powerbi.microsoft.com/en-us/blog/intro-pbi-js-api/, the new Power BI JavaScript API will allow you to write code that can securely pass through the iframe boundary, so that your application can programmatically perform an action in a report and listen for events from actions that users make from within the reports themselves.