@@ -0,0 +1,11 @@
+import Context from '../base/context'
+import getAncestry from './get-ancestry'
+
+export default function getFrameContexts(context) {
+  const { frames } = new Context(context);
+  return frames.map(({ node, include, exclude }) => {
+    const frameContext = { include, exclude };
+    const frameSelector = getAncestry(node);
+    return { frameSelector, frameContext }
+  })
+}
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.