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

detect if inside iframe and handle it appropriately #74

Open
yoshuawuyts opened this issue Jan 12, 2017 · 1 comment
Open

detect if inside iframe and handle it appropriately #74

yoshuawuyts opened this issue Jan 12, 2017 · 1 comment

Comments

@yoshuawuyts
Copy link
Owner

By doing window.self !== window.top we can detect if we're inside an iframe. Just like we're doing for electron we could act accordingly and make the router behave out of the box. Ref choojs/choo#344

@yoshuawuyts
Copy link
Owner Author

And then we can get the src tag from inside the iframe using document.referrer ✨ - it allows us to strip that part from each url and then booom, we're good (:

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