Rudy Celekli

Upstream contribution · lightpanda-io/browser

browser · Making Lightpanda respect browser message and selector contracts

Rudy Celekli’s engineering portfolio · AI-assisted summary

Problem

Lightpanda delivered window messages without checking the recipient origin the caller supplied. Its DevTools selector lookup also returned an error for a valid selector with no match, which caused clients that poll for late elements to stop early.

Engineering response

The browser validates and carries the intended origin through the asynchronous window-message task, then checks the receiving document's current origin before dispatching. The DevTools handler uses a successful response with node ID zero for an empty match and preserves separate error paths.

Evidence and scope

The window tests include cross-origin and malformed-origin cases, same-origin defaults and wildcard behavior. The PR reports that reverting only the implementation makes the regression fail. The selector PR gives a minimal Chrome-versus-Lightpanda DevTools exchange that explains the polling contract.