Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use BlazorIntersectionObserver inside an iframe? #54

Open
ajmorada opened this issue Dec 14, 2023 · 0 comments
Open

How to use BlazorIntersectionObserver inside an iframe? #54

ajmorada opened this issue Dec 14, 2023 · 0 comments

Comments

@ajmorada
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant