The MouseEvent object handed into the function handler for click has its element house set to the amount of times the target was clicked. Basically, detail might be two for the double-click, three for triple-click, and so forth. This counter resets right after a brief interval with no clicks occurring; https://emilianofpwdj.blogdal.com/24927828/click-for-dummies