49
rated 0 times
[
53]
[
4]
/ answers: 1 / hits: 31216
/ 10 Years ago, fri, june 27, 2014, 12:00:00
I am adding a listener like so:
window.addEventListener('native.showkeyboard', function (e) {
...
...
});
I'm writing a unit test for this so I want to trigger the event. Im doing:
window.trigger('native.showkeyboard');
But I end up with an error for that line saying:
undefined is not a function
How can I manually trigger this event?
EDIT
I have also tried:
$(window).trigger('native.showkeyboard');
but the handler doesnt run with this as it's not registered with jquery...
More From » jquery