fix(webview): page.getContentQuads should work for elements inside <iframe>#41437
fix(webview): page.getContentQuads should work for elements inside <iframe>#41437dcrousso wants to merge 1 commit into
page.getContentQuads should work for elements inside <iframe>#41437Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| let frameDoc: Document | null = null; | ||
| let frameView: (Window & typeof globalThis) | null = null; | ||
| try { | ||
| frameDoc = frame.contentDocument; |
There was a problem hiding this comment.
This branch is unlikely to work as iframes are typically cross-origin.
| target.value = target.value.slice(0, start) + text + target.value.slice(end); | ||
| if (!target) | ||
| return; | ||
| const view = target.ownerDocument.defaultView; |
There was a problem hiding this comment.
This looks like a part of a separate change.
…`<iframe>` leverage `elementFromPoint`, `getBoundingClientRect`, and `getComputedStyle` to manually compute the offsets of each ancestor `<iframe>` also use existing infrastructure of `error:notconnected` to tell the caller to re-resolve the element in the parent context
38d7a7f to
3529278
Compare
Test results for "MCP"3 failed 7377 passed, 1122 skipped Merge workflow run. |
Test results for "tests 1"2 failed 2 flaky49072 passed, 1142 skipped Merge workflow run. |
leverage
elementFromPoint,getBoundingClientRect, andgetComputedStyleto manually compute the offsets of each ancestor<iframe>also use existing infrastructure of
error:notconnectedto tell the caller to re-resolve the element in the parent context