From 987b011390b43cf06ced8c4b8642e72de1462652 Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Sat, 23 Nov 2024 14:10:28 +0100 Subject: [PATCH] update changelog (https://github.com/floooh/sokol/pull/1159) --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d39522615..95d712fb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ ## Updates +### 23-Nov-2024 + +- sokol_app.h html5: Merged PR https://github.com/floooh/sokol/pull/1159 (related + issue https://github.com/floooh/sokol/issues/1154). + + This cleans up code that is concerned about finding the HTML canvas to + render to by: + + - removing any leftover hacks from the time when Emscripten moved + from `document.getElementById()` to `document.querySelector()` for + looking up the canvas object + - adding two options for canvas objects that can't be looked up via + `document.querySelector()` + + If you don't provide a custom canvas name to sokol_app.h this change + is non-breaking. Otherwise: + + - in sokol_main(): change `.html5_canvas_name` to `.html5_canvas_selector` + - change the canvas name string to a CSS selector string (e.g. + from `"my_canvas"` to `"#my_canvas"`) + + For more options to communicate the HTML canvas object to sokol_app.h, + please read the new doc section `SETTING THE CANVAS OBJECT ON THE WEB PLATFORM` in sokol_app.h. + + Many thanks to @konsumer for kicking off the feature and the following + discussion :) + + ### 19-Nov-2024 - Merged PR https://github.com/floooh/sokol/pull/1155, this allows to use