# BackForwardListItem

The object represents a webpage in the back-forward of a web view.

Availability
8.0.0
9.2.0
Extends
Object

NOTE

This is an abstract type. Any object of this structure can be used where this type is used.

# Examples

# Basic Web View to External URL

Create a web view to a remote URL and open the window as modal.

var webview = Titanium.UI.createWebView({url:'http://www.appcelerator.com'});
var window = Titanium.UI.createWindow();
window.add(webview);
window.open({modal:true});

# Alloy XML Markup

Previous example as an Alloy view.

<Alloy>
    <Window id="win" modal="true">
        <WebView id="webview" url="http://www.appcelerator.com" />
    </Window>
</Alloy>

# Listening to Web View properties in iOS

Create a web view and listen 'title' property of web view.

var webview = Ti.UI.createWebView({
    url:'http://www.appcelerator.com'
});
webview.startListeningToProperties([ 'title' ]);
webview.addEventListener('title', function(e) {
    alert('Title is : -' +e.value);
});
var window = Ti.UI.createWindow();
window.add(webview);
window.open();

# Usage of allowedURLSchemes and handleurl in iOS

Create a web view and listen 'handleurl' event to open url from Titanium platform.

var webview = Ti.UI.createWebView({
    url: 'https://www.google.com',
    allowedURLSchemes: [ 'https', 'http' ]
});

webview.addEventListener('handleurl', function(e) {
    var handler = e.handler;
    Ti.Platform.openURL(e.url);
    handler.invoke(Ti.UI.iOS.ACTION_POLICY_CANCEL); 
});
var window = Ti.UI.createWindow();
window.add(webview);
window.open();

# Properties

# initialUrl

Availability
8.0.0
9.2.0
initialUrl :String

The URL of the initial request that created this item.


# title

Availability
8.0.0
9.2.0
title :String

The title of the webpage represented by this item.


# url

Availability
8.0.0
9.2.0
url :String

The URL of the webpage represented by this item.