[TIMOB-5541] MobileWeb: Methods canGoBack and canGoForward return object instead of boolean
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-06-07T04:56:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | MobileWeb |
Labels | n/a |
Reporter | Misha Vasko |
Assignee | Maxim Negadaylov |
Created | 2011-06-07T04:47:15.000+0000 |
Updated | 2017-03-09T20:23:55.000+0000 |
Description
Methods canGoBack and canGoForward return object instead of boolean type.
var win = Ti.UI.currentWindow;
var tf = Ti.UI.createTextField({
left: 10,
top: 5,
width: 320,
height: 40
});
var webView = Ti.UI.createWebView({
top: 50,
left: 10,
width: 250,
height: 300,
// url: 'google.com/404',
backgroundColor: '#AAD',
loading: false,
touchEnabled: false,
});
var but = Ti.UI.createButton({
left: 400,
top: 10,
title: 'canGoBack',
width: 200,
height: 50
});
var but2 = Ti.UI.createButton({
left: 400,
top: 70,
title: 'goBack',
width: 200,
height: 50
});
//win.add(but2);
win.add(but);
win.add(tf);
win.add(webView);
tf.addEventListener('return',function(){
webView.url = tf.value;
});
but.addEventListener('click',function(){
tf.value = webView.canGoBack();
});
Closing ticket as fixed.