# Browser Support LightningJS is designed with legacy devices in mind, ensuring compatibility with a wide variety of browsers. From **Chrome v38**, released in late 2014, to the latest modern browsers, LightningJS provides a reliable and efficient rendering experience. ## WebGL Compatibility LightningJS relies on **WebGL 1.x** (based on OpenGL ES 2.0) or newer for its rendering capabilities. If WebGL 1.x is supported in the browser, LightningJS will run without issues. Here are some key points about our WebGL implementation: - **Independent Rendering**: LightningJS is a contained renderer that uses WebGL, giving us full pixel-for-pixel control over the output. - **No CSS Dependency**: Unlike traditional DOM/CSS rendering, LightningJS avoids reliance on CSS features, extensions, or browser-specific CSS implementations. - **Consistency**: In our experience, WebGL support is consistent across browsers. Once LightningJS is confirmed to work in a browser, it will deliver uniform output. ## WebGL Context Loss On low-RAM devices (those with **less than ~1GB of physical RAM**) running **Chromium v123 or newer**, the browser may proactively free the GPU and **lose the WebGL context** when the app is backgrounded for more than ~5 seconds (see [Chromium change 5285836](https://chromium-review.googlesource.com/c/chromium/src/+/5285836)). This is common on Android TV and Fire TV. After a loss, the GPU resources (textures, programs, buffers) are gone and the underlying `gl.*` create calls return `null`. The renderer detects this via the canvas `webglcontextlost` event. On loss it stops the render loop (so it issues no GL calls against the dead context) and emits a `contextLost` event. The renderer does **not** rebuild GPU resources in place — it deliberately does not request context restoration. The supported handling is to reload the app on context loss: ```ts renderer.on('contextLost', () => { // GPU state is gone — the simplest reliable recovery is a reload. window.location.reload(); }); ``` ## Supported Browsers and Quirks Below is a detailed breakdown of confirmed browsers that work with LightningJS, along with the quirks or features specific to their versions: | **Browser** | **Version** | **Quirks / Features** | | ------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | **Chrome** | v38 | Bottom line for support; introduces Promises. Lacks `createImageBitmap`, iterable `UInt8Array/UInt8ClampedArray`. `ImageData` is mostly broken. | | | v48 | Adds support for `Blob:` and `Data:` in the Fetch API. | | | v49 | Introduces Proxies, improving reactive property handling in Blits. Not used in the Renderer. | | | v50 | Adds `createImageBitmap` (without options object). Enables Image Worker in a web worker. | | | v52 | Adds `config` for `createImageBitmap`, including support for alpha channel. | | | v54 | Enables resizing in `createImageBitmap`. | | | v63 | Adds support for dynamic imports. | | | v71 | Introduces `globalThis`. | | **QtWebKit** | 5.2 | Support for WebGL1, with known issues | | **WPEWebKit** | 2017 | Adds support for Image Worker and `createImageBitmap`. | | | 2.22 | Full support, including Lightning Native mode (disables DOM/CSS compositing except for ``, `