mirror of https://github.com/mosra/magnum.git
Browse Source
This took me a while -- the old behavior for all emscripten_*() functions was to take a DOM element ID as an argument, with nullptr acting as a "the element that makes most sense for given operation". The new behavior when -s DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=1 is enabled is to take a CSS selector instead. Presence of this option is not detectable at compile time, so there was no easy way of knowing what's the expected value, whether `"module"` or `"#module"`. After a few failed attempts, I discoverd that using `"#canvas"` would work for both the old and the new version -- in the new version it would be selecting an element with id="canvas", while in the old version it was a special value denoting Module['canvas']. Problem was, however, that the markup was historically using id="module" and not id="canvas", so this had to be changed. This is a breaking change affecting everyone who targets Emscripten. You need to update the HTML markup and, in case you maintain copies or forks of the CSS and JS files, these as well. Details in the changelog.pull/331/head
8 changed files with 49 additions and 20 deletions
Loading…
Reference in new issue