Repository navigation
Releases
Releases · lightpanda-io/browser
1.0.7
Behavior changes
- V8 now compiles a function with Maglev after about 2000 calls instead of 400. On real sites this cuts CPU load by about 10% with no change to load time.
--v8-maglev-invocation-countsets it back. - CSS custom properties (
var(--x)) are resolved when a property is read, so Tailwind 4 and other custom-property-heavy sites get the rightdisplay, visibility and layout - Media queries in the range form (
(width >= 40rem),(400px <= width < 800px)) now match. Tailwind 4 breakpoints such assm:blockused to never apply. @containersize queries apply in the cascade- A
<link rel="stylesheet">whosemediaattribute doesn't match is not applied (it is still loaded and listed indocument.styleSheets) IntersectionObserverandResizeObserveruse the real layout geometry, keep observing after the first callback, and run together in one rendering task- Cross-origin windows follow the spec: no prototype, a
SecurityErrorfor properties outside the allow list, and alocationwhere onlyhref(set) andreplace()work.frameElementisnullacross origins. --obey-robots: whenrobots.txtcan't be fetched (401, 403, 5xx, unexpected status, unparsable 200), the page is still blocked but the error is nowRobotsUnreachableinstead ofRobotsBlockedagent: the default Gemini model is nowgemini-4-hydrogen(wasgemini-3.8-flash)
Serve / CLI
--experimental-features webgl:getContext('webgl' | 'experimental-webgl' | 'webgl2')returns a WebGL context that draws nothing, instead ofnull. Renderers with no fallback, such as Compose for Web, then start. Without the flag nothing changes.--v8-maglev-invocation-count <INT>(default 2000)fetch --jsonhas aterminatedfield, true when--terminate-msstopped the page
Layout
- Vertical margins
- Images keep their aspect ratio when CSS sets only one side
white-space: pre,pre-wrap,pre-lineandbreak-spacesbreak lines on\n- A
flex-basisof 0 is honored when sharing out row width - Absolutely positioned boxes count in the document scroll range, so
window.scrollTo()can reach them innerTextline breaks depend on each element'sdisplay(and on float and position)text-transform: capitalize- A broken image's alt text stays inside the image box in screenshots
New Web APIs
document.execCommand:copy,cut,bold,italic,underlineandstrikeThrough, with their state and value queriesdocument.timeline.currentTime(fixes a hydration crash on some React / Next.js sites)HTMLDataListElement.optionsSVGElement.tabIndex,autofocusandnonce;WorkerGlobalScope.origin- Customized built-in elements can be created with
new - Named frame lookup: an iframe's
nameattribute sets itswindow.name, andwindow[name]/window.frames[name]find it, across origins too (Stripe Elements now mount) - CSS parsing:
lab(),lch(),oklab(),oklch(),color(),color-mix(), relative colors andposition-area
Web API behavior / fixes
:modalmatches a dialog opened withshowModal()- Clicking an indeterminate checkbox clears
indeterminate - XHR
responseTextdrops a leading UTF-8 BOM and is decoded with the response charset (or theoverrideMimeTypeone) Blobcontent types from XHR,ResponseandRequestare parsedRequestbody methods read a stream body as it arrives, likeResponseFormData.delete()andset()keep the order of entries- Deferred module scripts fetch their imports before running, so they keep their place in document order
ResizeObserverrespects theboxoption and fires on content changes[SameObject]collections return the same object every time- A textarea's default
displayisinline-block - A WAV source with no samples has a duration of 0
:nth-child()and related selectors don't overflow on large coefficients- IndexedDB checks that a transaction is active before checking that it is read-only
- A custom element callback that creates a cycle while reparenting no longer loops forever
- Crash fixes: an event target (WebSocket, XHR, ...) is kept alive while one of its events is, and a frame torn down with a navigation still queued is no longer freed twice
- Objects created in an iframe or popup that has navigated are safe to use: their calls now fail or are ignored, as in Chrome, instead of reaching the old document
CDP
Input.dispatchMouseEventpassesmodifiersto the DOM eventsInput.dispatchKeyEventpassesautoRepeattoKeyboardEvent.repeatNetwork.getResponseBodyreturns non-UTF-8 text bodies as UTF-8 text instead of base64Browser.grantPermissions,setPermissionandresetPermissionsreject an unknownbrowserContextId- The geolocation override is cleared when the browser context closes
- CORS: after
Fetch.continueRequestwith new headers, the preflight is decided on the page's original headers
BiDi
networkmodule:beforeRequestSent,responseStarted,responseCompletedandfetchErroreventsnetwork.addIntercept,removeIntercept,continueRequest,failRequestandprovideResponse
WebDriver
- Get Element Text includes the text of a visible textarea
Tools / MCP
searchresults tell which engine answered, in_meta(io.lightpanda/searchEngine)
Packaging
apt.lightpanda.iois updated automatically with each release
Performance / memory
- V8 Fast API for simple calls and field getters
- Markdown dumps are faster and use less memory (link resolution, and CDP writes the result straight into the reply)
- Style matching: rules checked in reverse, a jump over rules that share a left part, a bitset of tracked properties, and fewer layout cache clears on class and
left/rightchanges IntersectionObserver.observe()andunobserve()use a map (Airbnb observes hundreds of elements per second)- Less memory: WebGL interfaces are created only when used, selector attributes are boxed (about 4MB less peak RSS on cnn.com), and freed style slots are reused
1.0.7-rc1
Merge pull request #4903 from lightpanda-io/orderfile-regen orderfile: regenerate the hot-code profile
1.0.6
Behavior changes
- Screenshots now use the layout engine:
Page.captureScreenshot, BiDi screenshots andfetch --dump pngdraw boxes wheregetBoundingClientRectputs them.--png-mode readergives the old one-column text rendering. The agent's/screenshotkeepsreaderby default (mode=to change it). PDF is alwaysreader. Page.getLayoutMetricsnow comes from the layout engine, and the root container is as wide as the viewport instead of a fixed 1920px.- CORS: a
*inAccess-Control-Allow-Headersnow coversAuthorization, as every browser does. - A response with no declared charset that is clearly not UTF-8 is decoded as windows-1252.
- CDP:
DOM,CSS,AccessibilityandInputcommands (other thanenable/disable) now fail on the startup placeholder target.
Serve / CLI
--cdp-allow-timezone-override: letsEmulation.setTimezoneOverridechange the time zone used byDateandIntl. The zone is shared by the whole process. Without the flag, the command is accepted and ignored with a warning--png-mode layout|readerforfetch --dump pngagent --temperature <FLOAT>
Layout
- Padding and
box-sizing - Margins move boxes horizontally;
margin: 0 autocenters,margin-left: autopushes right gap,row-gapandcolumn-gapin flex layouts; text between flex items counts as an itembottomsizes a fixed or absolute box- Every
z-indexvalue is used for hit testing htmlandbodytake their declared height (height: 100%);canvasandvideowithout a size are 300Ã150- Every
displayvalue is tracked, for layout andgetComputedStyle
New Web APIs
navigator.clipboard.readText()andwriteText()(a per-session buffer, never the system clipboard; secure contexts only)HTMLMediaElementtimeline:duration, acurrentTimethat advances while playing, seeking,ended,loopand the matching events (nothing is decoded or played)ReadableStreamDefaultReader.closedOffscreenCanvasis anEventTarget(Flutter web apps now start)
Web API behavior / fixes
- CSS rules inside an
@supportsblock are applied when the condition holds - Streams:
pull()waits forstart()and for its own previous call, and runs again when a read waits (fixes Next.js 16 prefetch streams);cancel()handles a returned promise, and bothtee()branches share one cancel promise - XML parsing keeps namespace declarations (
xmlns,xmlns:b) and createsCDATASectionnodes
CDP
Emulation.setTimezoneOverrideapplies the zone (with--cdp-allow-timezone-override) and rejects unknown zone idsLP.detectFormsincludeValidationoption: returns each field's validation message
BiDi
script.addPreloadScriptscript.getRealmsbrowsingContext.captureScreenshotbrowsingContext.handleUserPrompt, and a newlp.handleUserPrompt, like CDP'sLP.handleJavaScriptDialog
Tools / MCP
detectFormsincludeValidationoption: returns each field's validation message, so an agent can read why a form was rejected
Performance / memory
- Startup no longer loads every CA certificate twice (about 30% of a simple
fetch) - Semantic tree dumps register far fewer nodes (HTML spec: 672k â 314k)
getBoundingClientRectand otherDOMRectreturns skip the identity map- Less memory for the identity map, cloned attributes, inline scripts, selectors, node lists and PNG rendering (drawn 128 rows at a time)
- Faster style matching: better
:where()bucketing, an ancestor bloom filter, and selectors that can never match are dropped - A class change that can't move a box no longer clears the layout cache
1.0.6-rc2
Merge pull request #4773 from lightpanda-io/orderfile-regen
1.0.6-rc1
Merge pull request #4444 from ZedingZhang/fix/domparser-xml-namespaceâĶ
1.0.5
Behavior changes
- PandaScript:
page.evaluate()now returns a promise, likepage.goto(). Saved scripts needawaitin front of everypage.evaluate(...). Several evaluates can now run at once withPromise.all. --v8-gc-hint-floor-mbis renamed--v8-gc-request-min-mb. The old name still works but is deprecated.- New
--v8-gc-auto-min-mb, default 32: V8 doesn't start a full GC on its own below this heap size.0keeps V8's default. classify,acceptCookiesandlogincan use Gemini, but only withLIGHTPANDA_DECISION_PROVIDER=gemini. TypeSafe stays the default.agent --savereplays a read-only script once before writing it. If the replay fails or returns nothing, the model gets one turn to fix the script, and the first script is kept, with a warning, when the fix doesn't replay. Scripts that act on a page are written unchecked.- A fetch or XHR whose connection drops before the end of a
Content-Lengthor chunked body now fails, instead of resolving as a complete 200. history.pushState/replaceStateto a URL of another origin throws aSecurityError.- Responses served from the HTTP cache now go through CORS checks.
document.currentScriptisnullwhile a module runs.- The
gototimeout (script API and MCP tool) now bounds the navigation wait, even while a parser-blocking script is loading. - Mouse hit testing skips
inertsubtrees.
Layout
- More realistic
topandheight, with awareness of positioned boxes, tables and text display: gridsupportem,remand basiccalc()lengths;min-heightandmax-height- Text wrapping uses the computed width
- Hit testing: positioned boxes are above the normal flow, negative
z-indexbelow it - Layout, hit testing and bounding rects are much faster (style caches are cleared only where a change can reach)
New Web APIs
NavigateEvent.intercept()ReadableStream.tee()andvalues()XMLHttpRequest.uploadprogress eventsAttr.specified
Web API behavior / fixes
- XHR: re-opening a request in flight doesn't fire
abort/loadend;responseType = 'document'is ignored in a worker - WebSocket
close()while connecting moves toCLOSINGand queues acloseevent Requestkeeps the case of methods other than the six standard onesfetchwithredirect: 'manual'keeps the URL- The
formdataevent gets its own copy of theFormData ResizeObserverstarts from a size of -1Ã-1- IndexedDB: a pending request keeps its JS object until its event fires (fixes Zone.js apps)
CDP
- Playwright can use the default context before any page:
context.addCookies()works, andpage.close()on the startup page no longer hangs DOM.getBoxModelreturns Chrome's error for an element underdisplay: noneAccessibility.getFullAXTreereports the selected option's label as a combobox valueLP.dumpwithFramesoption: include iframe content in the HTML dump- Crash fix in request interception on an aborted transfer
WebDriver
/alertcommands answerno such alert- Element
/displayed,/computedroleand/computedlabel - Shadow root endpoints:
/element/{id}/shadow,/shadow/{id}/element,/shadow/{id}/elements - Sessions accept
acceptInsecureCerts
BiDi
script.addPreloadScriptandscript.removePreloadScript(noargumentsyet)
Tools / MCP / Agent
lightpanda mcp --tools goto,tree,...exposes only the named tools;--list-toolsprints every name- MCP over HTTP: memory is returned to the OS when a session ends, and the idle default session closes its pages after
--http-session-timeout - PandaScript
page.getCookies() lightpanda runandagentnow apply--cookieand--cookie-jar- Markdown: definition list terms and details go on their own lines
Performance / memory
- Stylesheets with
--load-resources stylesheetare preloaded in parallel - Smaller CSS DOM: rules are created only when JS reads them,
@media/@layer/@supportsparsed once - Smaller nodes and elements (a
divgoes from 80 to 64 bytes) - The page HTML is held once instead of three times (CNN peak memory 65 MB â 54 MB)
fetch()takes the response body instead of copying it- Semantic tree uses less memory (HTML spec: 249 MB â 154 MB)
- Faster
getComputedStyle,nodeList[i]and object wrapping
1.0.5-rc2
Merge pull request #4717 from lightpanda-io/orderfile-regen orderfile: regenerate the hot-code profile
1.0.5-rc1
Merge pull request #4699 from lightpanda-io/script-async-evaluate script: make page.evaluate return a promise
1.0.4
Behavior changes
- Requests to the Fetch "bad ports" (ssh, smtp, pop3, imap, âĶ) are now refused for every request, not only WebSocket.
window.postMessagenow honorstargetOrigin.- A cross-site response can no longer set a
SameSitecookie other thanNone. - Proxy and server credentials are tracked separately, so proxy credentials are no longer sent to the server after a redirect.
- An
about:blank(or src-less) iframe now gets itscontentWindowandcontentDocumenteven without--load-resources iframe. Its HTTP and WebSocket requests are blocked while iframe loading is off. - An HTTP status from 600 to 999 (e.g. LinkedIn's
999) is now reported as-is instead of0. - Trusted
mousedown,mouseup,clickanddblclicknow stop at the first disabled form control, as in Chrome. - Element clicks and hovers from tools now hit the element's center instead of
(0, 0). document.readyStateis nowinteractivewhen deferred scripts run.Network.setUserAgentOverridenow logs a warning when a restricted user agent is ignored.- The HTTP server parses requests more strictly and its routes are guarded against DNS rebinding.
CDP
- Several page targets in one browser context. Console, exception and network events are routed to the right target, and a frame id from another target is rejected
- Accessibility:
ignoredReasonsnow match Chrome (ariaHiddenElement,ariaHiddenSubtree,inertElement,notRendered,notVisible) - Lone surrogate escapes in JSON (
"\udc00") are accepted instead of closing the connection LP.waitUntiland asettledlifecycle eventbeaconadded toLP.configureLoading- A closed browser context no longer leaves its viewport override for the next one
LPcommands described in/json/protocol
Serve / CLI
--wait-until settled(experimental): waits for load, then for the work that can still change the page. Interval timers, long timers and intersection observers don't hold it--v8-gc-hint-floor-mbreplaces the fixed 1 MiB GC hint floor. Off infetch--experimental-features animation: fireanimationstart,animationendandanimationcancelfor CSS animations- Bash 3.2 (macOS) filename completion
New Web APIs
AnimationEventand CSS animation events (behind--experimental-features animation)ClipboardEventInputEvent.getTargetRanges()execCommand('insertParagraph')getComputedStyle().contentresolved from the cascade
Web API behavior / fixes
- Text editors: CKEditor works, and clicks, focus and Tab place the caret in a
contenteditable(Slate, Draft.js) contenteditable: Backspace and Delete merge blocks (nested ones too), side-by-side lists merge, Enter in an empty list item outdents itexecCommand: runs of spaces and spaces at line edges become , so they stay visibleinnerTextkeeps spaces when CSSwhite-spacepreserves them, and puts a newline between rows ofthead,tbodyandtfoot:definedfollows the custom element state; customized built-ins (<button is=...>) now upgrade[CEReactions]forcreateElement/createElementNS; the reactions queue is no longer drained when a constructor returnsa.hashanda.search(and<area>) return""for a lone#or?history.pushState(undefined)no longer breakshistory.state; state that JSON can't encode throwsDataCloneErrorimport()of an already available module settles in a later task, as in Chromewindow.<id>on an iframe's window looks up the iframe's document- Functions called from a realm whose frame is gone no longer crash (
import(),import.meta,postMessage,location) - WebSocket: fragmented messages are reassembled; the server's
Sec-WebSocket-Protocolis checked against the offered list - CORS responses filter their headers
Response.clone()on a stream;pipeTo/pipeThroughfixes- Input
stepUp/stepDownwith fractional steps (0.1 + 0.2gives0.3) matchMedia("")always matches- SVG
getCTM()/getScreenCTM()return an identity matrix on a detached element frameandbasefontare serialized as void elementsdocument.createEvent('inputevent')is rejected;PromiseRejectionEventrequires its optionsnew CSSStyleSheet()sheets are the only onesreplace()acceptsIntersectionObserver: the first check runs on the next tick
Tools / MCP
treedelta: true: returns only the lines that changed since the last call- The page's WebMCP tools are reported in a tool result whenever they change
- Actions that open a window late (after a fetch or a timer) now follow it; new
popupstool lists and switches windows clicksays when the element is disabled or not rendered- Tool arguments are type-checked, and every error names the argument and the problem
treeandmarkdownkeep content that is rendered despitehiddenoraria-hidden- Markdown:
<ol start>, multi-paragraph blockquotes, a blank line before--- - MCP over HTTP: tool output streamed over SSE (the
runtool streams console lines),logging/setLevel, andnotifications/cancellednow stops the call in flight - The
runtool description explains how to load pages in parallel
Performance / stability
- Style caches are invalidated per property group, and a geometry change no longer resets the whole geometry cache
- Smaller CSS declarations (~500 KB saved on a style-heavy site); property names are ids, and style matching compares ids (7%+ faster rebuilds on most frameworks)
- XHR takes the response body instead of copying it
- XPath parsing allocates less
- Crash fixes: abort during a gated transfer, a UAF in custom element upgrade
- The crash reporter exits non-zero when it can't start
curl
Release
- macOS builds run on macOS 15; the Intel build targets baseline x86_64, fixing "Illegal instruction" on older CPUs
- Release candidates (
1.0.4-rc1) are now published
1.0.4-rc1
Merge pull request #4584 from lightpanda-io/pre-release