You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Michael Blythe edited this page Aug 30, 2016
·
4 revisions
What actually happens when you call powerbi.embed(element, embedConfig);?
Determine if we are embedding an element that contains embedded content.
If the content already embedded is of the same type, we can re-use the existing iframe and simply send a new load command to it rather than reloading the entire contents of the iframe. Reload is much slower because there is a significant amount of JavaScript to download.
(New Embed) Create instance of embed object. (Existing Embed) Skip this step.
The constructor of the embed will normalize all the required configuration from either the HTML attributes or those passed directly in the configuration object.
The elements content is replaced with an <iframe> whose src attribute is set to the embed url from the embed configuration.
A load event listener is added to the iframe element.
When the iframe loads the HTML page it calls embed.load, which is the next step.
Call embed.load, which takes the normalized load configuration that sends the loadConfiguration object (a subset of the embedConfiguration) to the iframe via window.postMessage.