From: Joonghun Park Date: Thu, 13 Jun 2013 02:29:48 +0000 (+0900) Subject: [ImageRotation] add eventHandler for tizen hardware backKey X-Git-Tag: 2.2_release~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce1cb85be9dfe173ba6564ccf79ec3753dada7cd;p=samples%2Fweb%2FImageRotation.git [ImageRotation] add eventHandler for tizen hardware backKey Change-Id: I144c0f36bb832b349789c59206b34f75899b1936 --- diff --git a/js/main.js b/js/main.js index ef545a0..c805245 100755 --- a/js/main.js +++ b/js/main.js @@ -20,4 +20,11 @@ function deviceOrientationEvents() { } } -window.onload = function() {deviceOrientationEvents();}; +window.onload = function() { + //add eventListener for tizenhwkey + document.addEventListener('tizenhwkey', function(e){ + tizen.application.getCurrentApplication().exit(); + }); + + deviceOrientationEvents(); +};