Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I would like to create a Visual that just displays a web-page. The Url would be data driven.
As I'm a complkete TypeScript newbie I would first like to inform if this would be possible ?
Kind regards, Harry
Solved! Go to Solution.
Hi @LeboeufHarry,
Custom visuals are themselves hosted in a iframe. The only sandbox attribute set is allow-scripts, so custom visuals are not very permissive.
In order to embed a web page, you'll need to add an additional iframe element to your visual and then its src attribute would need to be the data-driven URL. You'll therefore need to consider:
Without getting into developing custom visuals, you would previously have been able to test this in Power BI using the HTML viewer custom visual, but that seems to have disappeared recently. I know that when people have tried this approach with certain sites, they might work in the Power BI Service (online) but not in Power BI Desktop due to some differences in how they work (this probably has something to do with the service being identified as powerbi.com but Desktop technically not being hosted at a specific loaction on the web... I haven't looked into it in great detail).
However, you could so a simple proof-of-concept test outside of Power BI with a .html file. Something like the following HTML could simulate an iframe being hosted in a custom visual's iframe:
<html>
<body>
<!-- Simulating a sandboxed iframe (custom visual) -->
<iframe sandbox="allow-scripts" height="300" width="300">
<!-- Page we want to see -->
<iframe src="https://www.google.com">
</iframe>
</iframe>
</body>
</html>
(note that google.com definitely won't work as they do have the permissions detailed in#1 above set; this is just so that you can see where I'd be coding my intended URL).
Regards,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi @LeboeufHarry,
Custom visuals are themselves hosted in a iframe. The only sandbox attribute set is allow-scripts, so custom visuals are not very permissive.
In order to embed a web page, you'll need to add an additional iframe element to your visual and then its src attribute would need to be the data-driven URL. You'll therefore need to consider:
Without getting into developing custom visuals, you would previously have been able to test this in Power BI using the HTML viewer custom visual, but that seems to have disappeared recently. I know that when people have tried this approach with certain sites, they might work in the Power BI Service (online) but not in Power BI Desktop due to some differences in how they work (this probably has something to do with the service being identified as powerbi.com but Desktop technically not being hosted at a specific loaction on the web... I haven't looked into it in great detail).
However, you could so a simple proof-of-concept test outside of Power BI with a .html file. Something like the following HTML could simulate an iframe being hosted in a custom visual's iframe:
<html>
<body>
<!-- Simulating a sandboxed iframe (custom visual) -->
<iframe sandbox="allow-scripts" height="300" width="300">
<!-- Page we want to see -->
<iframe src="https://www.google.com">
</iframe>
</iframe>
</body>
</html>
(note that google.com definitely won't work as they do have the permissions detailed in#1 above set; this is just so that you can see where I'd be coding my intended URL).
Regards,
Daniel
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
3 | |
2 | |
1 | |
1 |