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

Ability to specify window and document? #31

Open
jspath opened this issue Jan 9, 2018 · 1 comment
Open

Ability to specify window and document? #31

jspath opened this issue Jan 9, 2018 · 1 comment

Comments

@jspath
Copy link

jspath commented Jan 9, 2018

I was wondering if it would be possible to specify/pass the window and document into resize-observer-polyfill.

I will be loading my script using the FIF (Friendly iFrame) method. When I do this, I have to get the parent window and parent document. If I attempt to use the global window and global document, I'll end up with the window and document of the iframe, not the main page.

Information on FIF can be found at the following links:
https://www.facebook.com/note.php?note_id=10151176218703920
http://www.lognormal.com/blog/2012/12/12/the-script-loader-pattern/

Thanks!

@jspath
Copy link
Author

jspath commented Jan 11, 2018

It's worth noting that the ResizeObserver callback is fired once initially, even if the element is in the parent window, but resize events on the element are not detected properly.

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