I want to catch an event when a user selects text on a Firefox page, such as an IDM add-in (or IE8 +), when a user selects text.
Can anybody help me?
You could attach an event listener mouseupand a listener, keypressrespectively, to select the mouse and keyboard, and then use it window.getSelection()to indicate whether any text is selected.
mouseup
keypress
window.getSelection()
, . IE select, , . keyup mouseup .
select
keyup
Source: https://habr.com/ru/post/1779821/More articles:redirected request when throwing an exception - javaIntercepting Perl through a hash causes a strange value - perlArrayIndexOutOfBoundsException when repeating all elements of an array - javaSWT: draw “icons” in the cells of a table or tree - javaHow to get the best result in WPF when many user interface controls are displayed? - performanceПолучение ключа-модификатора, нажатого в канале CGEvent - eventsCorrect way to add robots.txt file and hide it? - authenticationDefine Derivation Type from Generic Type - genericsиспользование typedef при объявлении структур в С++ - c++Two pointers of various information are stored - c ++All Articles