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

support working with elements in iframes #78

Closed
rodneyrehm opened this issue Nov 26, 2015 · 0 comments · Fixed by #79
Closed

support working with elements in iframes #78

rodneyrehm opened this issue Nov 26, 2015 · 0 comments · Fixed by #79
Assignees
Labels

Comments

@rodneyrehm
Copy link
Member

Any module accepting a context argument should use context.ownerDocument (instead of document) to query the DOM, in order to be able to work with elements in nested iframes. Currently this fails for (at least)

  • utils/node-array (instanceof is not a good idea)
  • get/insignificant-branches
  • is/is.util
  • query/focusable.strict
  • when/focusable

That is about the scope we need to allow running the is/* tests against elements in an iframe.

To make this really work, we'd have to do quite some more:

  • any use of the global references document and window need to go through element.ownerDocument and element.ownerDocument.defaultView respectively
  • any use of the instanceof operator must be replaced by a window-independent alternative

We'll go for the simple solution (not covering window and instanceof) until someone actually needs to do this - in which case we'll expect another issue being opened.

@rodneyrehm rodneyrehm self-assigned this Nov 26, 2015
rodneyrehm added a commit that referenced this issue Nov 26, 2015
fix(core): support testing is/* in iframes - closes #78
@rodneyrehm rodneyrehm modified the milestone: 1.1.0 - second wave Nov 30, 2015
rodneyrehm added a commit that referenced this issue Dec 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant