Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var name = '';
- // get the name by dereferencing 'e'
- console.log('OnClick: ' + name );
- }
- $('#input').keydown( function( e ) {
- var key = '';
- // get the key by dereferencing 'e'
- // example:
- // key = e.originalEvent.srcElement.value;
- console.log('OnKeydown: ');
- }
- // I have tried adding numerous Event listeners to the Global object (or local) w/o JQuery like this:
- self.addEventListener("dispatchKeyEvent", function ( e ) {
- console.log('GLOBAL dispatchKeyEvent');
- });
- self.addEventListener("OnKeyListener ", function ( e ) {
- console.log('GLOBAL OnKeyListener ');
- });
- // ... just to see if it is sending other kinds of events that I am missing.
- [Violation] 'setTimeout' handler took 65ms
- (index):866 OnClick
- (index):866 OnClick Key: undefined
- jquery-3.3.1.min.js:2
- [Violation] 'click' handler took 2416ms
- (index):866 OnKeydown
- (index):866 Key: C
- jquery-3.3.1.min.js:2
- [Violation] 'keydown' handler took 2738ms
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement