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

Child script? #4

Closed
danbars opened this issue Oct 28, 2024 · 1 comment
Closed

Child script? #4

danbars opened this issue Oct 28, 2024 · 1 comment

Comments

@danbars
Copy link

danbars commented Oct 28, 2024

Hi,

Thanks for creating this open alternative.
Can you please shed some light on the child script? In the example I don't see that the child has any script. Does this work without it somehow? Or does it work only because the parent and child have the same origin?

If a child script is needed, can you please show an example how it should be included?

Thanks!

@Lemick
Copy link
Owner

Lemick commented Oct 28, 2024

Hi, thanks :)

Yes, if you talk about this example, the child iframe does not need to load any additional script since the parent and the iframe share the same origin, thus the parent has full control over the iframe element.

There is an example of a cross-origin setup:

You always need to import the same script, as the script will automatically register the necessary listener if the current window is embedded in an iframe, I hope this is clear 👍

@Lemick Lemick closed this as completed Nov 9, 2024
@Lemick Lemick pinned this issue Nov 9, 2024
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

2 participants