-
Notifications
You must be signed in to change notification settings - Fork 791
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
feat(utils): add getFrameContexts method #2995
Conversation
import getAncestry from './get-ancestry' | ||
|
||
export default function getFrameContexts(context) { | ||
const { frames } = new Context(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This creates axe._tree
, which is going to slow stuff down. Can we avoid that? And if not, how do we avoid either a tree that is outdated by the time axe.runPartial is called, or generating the tree twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to fix this in this pr or another one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, we can let Context build axe._tree. I've accounted for it in the updated proposal.
import getAncestry from './get-ancestry' | ||
|
||
export default function getFrameContexts(context) { | ||
const { frames } = new Context(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, we can let Context build axe._tree. I've accounted for it in the updated proposal.
Co-authored-by: Wilco Fiers <[email protected]>
Co-authored-by: Wilco Fiers <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
For the record: I passed this one off to Steve, who finished it up. Steve checked my work, and I checked his additions. Michael reviewed this for security. |
Add a utility which is passed a context object, and returns the context for each iframe.
Closes issue: #2937