Dojo: What event fires when a page / window loses focus?

Is there an event in the Dojo javascript framework that fires when the whole page loses focus?

If the event is not triggered, is there another way to track window focus loss? I want to be able to say when someone clicks a button from a page so that I can register an action (his educational project, we control students' actions for templates, etc.).

+4
source share
1 answer

Yes, this is commonly known as the blur event.

This can be done in direct JavaScript, Dojo is not needed here:

 window.onblur = function() { //do something here... }; 
+11
source

All Articles