I am writing a plugin that does things to a specific note (daylies.md). I would like to trigger these actions when the note is focused on (i.e. when switching to it from another note, or when Obsidian starts with this note as the default one, …).
I found the hasFocus() method but I guess that this is just a method that returns whether the editor has focus or not.
Is it possible to watch (and run a callback) for when a note gets focused on?