Closed skhurams closed 9 years ago
In order to reduce magical behaviour, there is now a flag to indicate if current page title should be shown. See showPageTitle
staticText
sets static text for title. This property overrides showPageTitle (see below).showPageTitle
when set to true, title of the current web page will be shown.One thing to keep in mind is that staticText
will override showPageTitle
so you need to remove your staticText
property. So it should look something like
title: {
color: '#FFFFFF',
showPageTitle: true
}
O I see you are trying to retrieve document.title
through executeScript
. Can you please elaborate on how it's not working? What do you see from log? If you open Safari remote debugger and look at console, do you see any JavaScript errors?
no errors actually when i run js debugger the code is not executed at all.
The code you execute should be
document.title
Not
return document.title
eg:
ref.executeScript({
code: 'document.title'
}, function(values) {
alert(values);
});
thanks it helped
HoW TO ADD LAODER IN IONIC themeable browser????????? and how to change title text dynamically when load start and load stops? currently iam adding laoder on on event start but it showing the loader in themebrowser. its showing when themebrowser closes.(i mean showing in prev page).
var ref = cordova.ThemeableBrowser.open(link, '_blank', {
statusbar: {
color: '#f24f4f'
},
toolbar: {
height: 40,
color: '#f24f4f'
},
title: {
color: '#FFFFFF',
showPageTitle: false,
staticText: 'Add New Web Page'
},
/*backButton: {
image: 'back',
imagePressed: 'back_pressed',
align: 'left',
event: 'backPressed'
},
forwardButton: {
image: 'forward',
imagePressed: 'forward_pressed',
align: 'left',
event: 'forwardPressed'
},*/
closeButton: {
image: 'close',
imagePressed: 'close_pressed',
align: 'right',
event: 'closePressed'
},
/*customButtons: [{
image: 'share',
imagePressed: 'share_pressed',
align: 'right',
event: 'event_getThumb'
}], */
backButtonCanClose: false
});
//});
ref.addEventListener('loadstart', function(event) {
$rootScope.LoaderShow();
});
ref.addEventListener('loadstop', function(event) {
$ionicLoading.hide();
});
ref.addEventListener('event_getURL', function(event) {
});
ref.addEventListener('exit', function(event) {
$ionicLoading.hide();
});
Hi i want to get current page title how do i get this. my ref.executescript is not working. heres what i have done so far