Make Fathom see into iframes
Opened this issue · 1 comments
erikrose commented
Fathom's input comes from querySelector calls. Those cannot penetrate into iframes of different origins due to the same-origin policy. See if we can get around that somehow, perhaps with privileged code. It would be useful for credit-card autofill.
We should be able to see into iframes of the same origin. Confirm this is the case.
DimiDL commented
To make this issue more clear:
- For cross-origin iframes, we can't see elements inside the cross-origin iframe due to same-origin-policy
- For same-origin iframes, although we can see elements inside an iframe,
querySelector
doesn't search elements outside the document.
To support penetrate same-origin iframes, the solutions I can think of currently is either extending the querySelector
call to include iframes, Ex, querySelector("iframe").contentDocument.querySelector(selector)
or performing vectorization in every same-origin document.