I am working on PowerBI custom visual. What I want to do is access outer most body tag to attach an element using jQuery but I am not able to do that as all custom visual are loaded in an iFrame and my current window object only points to iframe container area.
How can I access outside from this iFrame to parent window (topmost)? I know and I have gone through similar answers on StackOverflow and GitHub. I even liked this answer here. How to communicate between iframe and the parent site?
Now the problem is, It is the same domain iframe as what I see in URL i.e. https://app.powerbi.com.
The second thing is while developing custom visual in VSC or other editors using PBIVIZ APIs, you only have access to iframe container where your custom visual is loaded. Thus you can't access code that is there outside or at the parent location of this iFrame. I believe it is part of PowerBI environment itself.
Third thing is, there is no configuration available to remove or load custom visual without iFrame itself. Please let me know if there is one.
This is also done for one of the Power BI's own visual (date slicer) which doesn't load any iFrame when you inspect that code in the browser.
Does anyone have any Idea? GitHub issue for more information: https://github.com/microsoft/PowerBI-visuals/issues/544