Back to previous page using HW back button on web app based on Tizen Web UI Framework

Back to previous page using HW back button on web app based on Tizen Web UI Framework

BY 24 Oct 2013 Web Application Development

Hello,

How i can navigate to previous page using HW Back button on web app based on Tizen Web UI Framework.

This code isn`t worked:

document.addEventListener( ‘tizenhwkey’, function(e) {
if (e.keyName === ‘back’) {
if ($.mobile.activePage.attr(‘id’) === ‘one’) { tizen.application.getCurrentApplication().exit(); } else { history.back(); }
}});

I have following error:

TypeError: ‘undefined’ is not a function

 

Written by