mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 23:42:53 +08:00
16 lines
310 B
JavaScript
16 lines
310 B
JavaScript
function KeyEvent()
|
|
{
|
|
}
|
|
|
|
KeyEvent.prototype.backTrigger = function()
|
|
{
|
|
var e = document.createEvent('Events');
|
|
e.initEvent('backKeyDown');
|
|
document.dispatchEvent(e);
|
|
}
|
|
|
|
if (document.keyEvent == null || typeof document.keyEvent == 'undefined')
|
|
{
|
|
window.keyEvent = document.keyEvent = new KeyEvent();
|
|
}
|