Dark98 e57315b785 feat(web): add Pause in Background option, TeaVM reflection filtering, and HUD drawImage guards
Improve webclient stability, background resource usage, and script reflection compatibility across desktop and mobile browsers.

### Web Client Features & Fixes
- `index.html` & `RSApplet.java`
  - Added a **Pause in Background** (`#opt-pause-bg`) option under **Display & Graphics** persisted in `localStorage` (`2006scape_web_options.pauseInBackground`) and synced live via `window.scapePauseInBackground`.
  - Added `visibilitychange` Web Audio suspend/resume handling in `index.html` and `isPausedInBackground()` loop throttling in `RSApplet.run()` (resetting timing buffers on resume to avoid tick bursts).
- `DesktopHooks.java`
  - Added `naturalWidth > 0` guards to `jsDrawModernMinimap` and `jsDrawModernChat` to prevent `InvalidStateError` on `drawImage` when HUD images are still loading or broken.

### TeaVM Script Reflection
- `WebReflectionSupplier.java`
  - Added `hasUnscriptableParam(...)` to exclude methods referencing `java.util.function.*`, `java.lang.Thread*`, `java.io.*`, or `java.awt.*` from TeaVM reflection metadata.
2026-12-02 17:20:27 +00:00
S
Description
No description provided
5.7 MiB
0 Stars 1 Watchers 0 Forks
Languages
Java 74.5%
HTML 24.3%
JavaScript 1.2%