simon-git: puzzles (main): Ben Harris
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Wed Mar 1 22:20:14 GMT 2023
TL;DR:
5a74693 js: Use the Pointer Events API, but only to capture the pointer
c0f715f KaiOS: be more cautious about determining whether KaiAds is present
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Ben Harris <bjh21 at bjh21.me.uk>
Date: 2023-03-01 22:20:14
commit 5a74693b329eadb69153b150754eb099a0c87e9a
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=5a74693b329eadb69153b150754eb099a0c87e9a;hp=5a491c5ad333ef34c1e7713f920f51cbb205af60
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Wed Mar 1 21:55:07 2023 +0000
js: Use the Pointer Events API, but only to capture the pointer
Element.setPointerCapture() captures both pointer and mouse events, so
we can use our existing mouse handlers and just have a minimal
pointerdown handler that calls setPointerCapture(). This saves (or at
least postpones) all the tedious rewriting referred to in ecd868ac.
This means that now drags beyond the puzzle area work in WebKit-based
browsers, and we don't get deprecation warnings in current Gecko-based
ones. Older Gecko-based browsers continue to use Element.setCapture()
and hence still work correctly.
emccpre.js | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
commit c0f715fbaca77fbb6e86de604098d82687bdea48
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=c0f715fbaca77fbb6e86de604098d82687bdea48;hp=5a74693b329eadb69153b150754eb099a0c87e9a
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Wed Mar 1 22:13:59 2023 +0000
KaiOS: be more cautious about determining whether KaiAds is present
Just checking for the getKaiAd() function by doing "if (!getKaiAd ..."
throws a ReferenceError if it's not defined, and now my error box
catches that. Using "if (getKaiAd === undefined ..." seems to be
acceptable, though.
kaios/kaiads-glue.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the tartarus-commits
mailing list