merge: reconcile UI updates with DSH audit fault isolation
This commit is contained in:
commit
e565f67b46
145 files changed
+3688
-112
No files matched your search
+4
-1
@@ -43,7 +43,10 @@ export async function connect(port=9226) {
|
||||
rect=await evaluate(`(()=>{const e=${expression};if(!e)throw Error('Missing click target');const r=e.getBoundingClientRect();return {x:r.x+r.width/2,y:r.y+r.height/2};})()`);
|
||||
await call('Input.dispatchMouseEvent',{type:'mouseMoved',...rect});
|
||||
await evaluate('new Promise(resolve=>{setTimeout(resolve,150);requestAnimationFrame(()=>requestAnimationFrame(resolve));})');
|
||||
ready=await evaluate(`(()=>{const e=${expression};if(!e)return false;const r=e.getBoundingClientRect(),top=document.elementFromPoint(r.x+r.width/2,r.y+r.height/2);return r.width>0 && r.height>0 && (e===top || e.contains(top));})()`);
|
||||
// Polling can re-render and move the target after mouseMoved. Dispatch
|
||||
// to the exact coordinates we just hit-tested, not the earlier point.
|
||||
const hit=await evaluate(`(()=>{const e=${expression};if(!e)return null;const r=e.getBoundingClientRect(),x=r.x+r.width/2,y=r.y+r.height/2,top=document.elementFromPoint(x,y);return r.width>0 && r.height>0 && !e.disabled && (e===top || e.contains(top))?{x,y}:null;})()`);
|
||||
ready=!!hit;if(hit)rect=hit;
|
||||
if(ready)break;
|
||||
await new Promise(resolve=>setTimeout(resolve,80));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user