Skip to content

How to use BlazorIntersectionObserver inside an iframe? #54

@ajmorada

Description

@ajmorada

Hello,

I would like to ask how do I go about in using the component inside an iframe?

I tried to run the Blazor.IntersectionObserver.Client project in my local environment and it works as expected. But when I try to embed the URL of the project in an iframe in a different html page, the BlazorIntersectionObserver no longer works.

Please see the video below:

BlazorIntersectionObserver-IFrame-Issue.mp4

An exception can also be seen in the browser console

BlazorIntersectionObserver-IFrame-Issue-Console-Error

This is the source of the iframe html page.

<html>
<head><title>Test Iframe for Blazor 1</title></head>
<body>		
    <iframe src="https://localhost:5001/" height="1200" width="800" title="Iframe Example"></iframe> 
</body>
</html>

Thank you in advance for your advice

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions