I have tried to call a javascript function with isc.Page.registerKey.
function genTabKey(){
var evt = document.createEvent("KeyboardEvent");
(evt.initKeyEvent || evt.initKeyboardEvent)("keypress", true, true, window,
0, 0, 0, 0,
0, 9);
var canceled = document.dispatchEvent(evt);
(evt.initKeyEvent || evt.initKeyboardEvent)("keypress", true, true, window,
0, 0, 0, 0,
0, 27);
canceled = document.dispatchEvent(evt);
}
I got this error "Uncaught TypeError: Illegal invocation"
function genTabKey(){
var evt = document.createEvent("KeyboardEvent");
(evt.initKeyEvent || evt.initKeyboardEvent)("keypress", true, true, window,
0, 0, 0, 0,
0, 9);
var canceled = document.dispatchEvent(evt);
(evt.initKeyEvent || evt.initKeyboardEvent)("keypress", true, true, window,
0, 0, 0, 0,
0, 27);
canceled = document.dispatchEvent(evt);
}
I got this error "Uncaught TypeError: Illegal invocation"