Fewer script errors on real sites, and finished pages give all their memory back
We loaded twelve live sites in Floati and in the reference browser and fixed the script errors only Floati threw. A large encyclopedia no longer throws on every load and a browser-support site works again. Classes now inherit static methods the way the reference browser does, typed arrays gained the 25 methods they were missing, BigInt converts exactly, and promise rejections nobody handles are reported just as the reference browser reports them. Scripts, workers and pages that finish now hand back all of their memory.
Fixed: a large encyclopedia threw an error on every load. Pages can ask to run work when the browser is idle (requestIdleCallback), and the callback receives a deadline object that says how much idle time is left. Floati passed an empty object, so asking it for the time remaining failed. It is now a real deadline, and objects report their own type name the standard way, including through getters and inherited prototypes.
Rendering
Fixed: a browser-support site, and other sites built with Lit, stopped at startup. A tagged template (html`<p>${x}</p>`) gives its function a frozen list of the text pieces, the same list every time, with the raw text attached as a hidden property. Lit checks for exactly that before it renders anything. Floati now builds the list once per place in the code, frozen and shaped as the standard says.
JavaScript & JIT
Classes inherit their static side. class MyArray extends Array now gets Array.from and Array.of, and they build a MyArray; Promise, Map, typed arrays and errors work the same way, including the species getters that decide what kind of object map and filter return. 12 of 20 checks in our probe gave a different answer from the reference browser; all 20 now match.
Media
Typed arrays have all their methods. Uint8Array, Float32Array and the rest were missing 25 of their 31 standard methods (map, filter, reduce, sort, find, includes, join, the iterators and the copying versions like toSorted and with). Image, audio, crypto and WebAssembly code used them and threw. Generic array methods called on a typed array now read its real values too.
JavaScript & JIT
BigInt converts exactly. BigInt('0x1f'), BigInt(' 42 ') and big integers from numbers come out exact, a fraction is a RangeError and a bad string a SyntaxError as in the reference browser, and BigInt.asUintN and asIntN are new.
Rendering
Weak maps and weak sets take every key the standard allows: built-in functions, and symbols that are not from the global symbol registry (a 2023 addition). A news site used one and threw.
DevTools
Promise rejections nobody handles are reported. When a promise fails and no code ever handles it, the reference browser fires an unhandledrejection event on the window (pages use it for error reporting) and, if nothing cancels it, logs Uncaught (in promise) in the console. Floati now does both at the same moment the reference browser does, and never reports a promise that any then, catch, await or Promise.all picked up. Our real-site error check could not see these before; now it does, so it found new things to fix, such as dynamic import() on a developer-docs site.
JavaScript & JIT
Arrays answer hasOwnProperty for their named properties, and a frozen array reports them as read-only.
Rendering
Moving a node from one document into another keeps it the same node. Every document a page creates (for templates, parsing or imports) now shares the page's node storage, so a moved node keeps its identity and no longer replaced an unrelated element of the page.
Memory & reading
Finished scripts, workers and pages leave nothing behind. Built-in objects point at each other in loops (Array.prototype.constructor is Array), and counting references alone can never free a loop. Page sessions cleaned up those loops when they closed, but standalone scripts and finished workers did not, so each kept about 119 KB, and every page navigation left about 22 KB of built-in prototypes behind. Both are now freed, and a test proves memory stays flat over 40 repeats.