events - Is there a way to detect find on the page searches in javascript -
events - Is there a way to detect find on the page searches in javascript -
each browser has find on page functionality (ctrl+f). there way observe user searches in javascript attach additional actions.
of course of study can seek hook ctrl+f
or cmd+f
shortcut, if works on "some" browsers, way know user pressed shortcut , search something.
if browser allows overwrite shortcut, farther block default behavior , implement own search logic on site. considered times bad practice. overwritting native browser behavior pretty pretty bad.
on other hand, there no "event" gets triggered when browser executed search process. in short words, no, there no way observe or hook search process javascript (if there one, it's never gonna cross browser compatible).
javascript events find
Comments
Post a Comment