onAppEventsをすべて見つけるにはどうすればよいですか?カラースキーム切り替えのイベントはありますか?

In the JS API there is onAppEvent allowing to listen for an event. But how can I find the list of these events? I tried searching for onAppEvent and .trigger(, but have not found much.

Right now I am looking for an event triggering on the automatic color scheme switching (Automatic Dark Mode color scheme switching). Does such event exist?

「いいね!」 2

You need to look for this.appEvents.trigger and this.appEvents.on
This object accessible from a handful of ember objects.

「いいね!」 3

This specific event is handled by the browser, Discourse doesn’t have its own event here. But you can have a JS listener for the prefers-color-scheme media query. See How to detect dark mode using JavaScript (or search Google for other examples).

「いいね!」 2