Repository navigation
v1.8.0
Nothing changes for players; this release is for the mods that use the library.
A mod's page can be told to keep its state: a payload sent with PostOptions.Retain is remembered per channel and handed to every page that loads afterwards. That matters because the library reloads a page by itself after a renderer hiccup, and the fresh document would otherwise start from its own defaults while the mod believes it already sent its configuration.
Overlays that stream live data can keep up instead of falling behind: PostOptions.LatestOnly drops a payload the library is still holding when a newer one on the same channel arrives, and a page can ask for the same on its side with overlay.on(channel, fn, { latest: true }), which hands over the newest payload once per frame rather than a backlog. Once a message has gone to the browser there is no queue left here to collapse, which is why the page has the other half.
Events can now be taken on the consumer's own terms: Dispatch = EventDispatch.Manual plus PumpEvents() delivers them inside the mod's own Update, at the point it chooses and on its own frame budget - the answer to dispatched handlers being billed to this library by a profiler.
Fixed: messages and scripts queued before the first LoadHtml or Navigate are no longer discarded by it. Clearing exists so leftovers for a page being left behind do not reach its replacement; naming the first page is not that.