-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Wrong window object for iframes. #644
Comments
What's the browser support of that property? I didn't know of its existence! |
Here is how I have done it in production for a long time. var doc = element.ownerDocument;
var win = (doc.defaultView || doc.parentWindow); That works on iframes and svg 's and supports IE. |
I think that you have to patch it again, because with that code you cannot use
var doc = element.ownerDocument || element;
So if element = window, everything works again. Anyway this is just a suggestion, use the best method you want. |
I am assigning events to an iframe or svg from the parent window and hammerjs is using the parent window object when adding addEventListeners(). If you could instead get the element.ownerDocument and then the window object from the document that would help solve this problem.
The text was updated successfully, but these errors were encountered: