BackForwardList#

class BackForwardList(**properties: Any)#

Superclasses: Object

List of visited pages.

WebKitBackForwardList maintains a list of visited pages used to navigate to recent pages. Items are inserted in the list in the order they are visited.

WebKitBackForwardList also maintains the notion of the current item (which is always at index 0), the preceding item (which is at index -1), and the following item (which is at index 1). Methods go_back() and go_forward() move the current item backward or forward by one. Method go_to_back_forward_list_item() sets the current item to the specified item. All other methods returning BackForwardListItem<!– –>s do not change the value of the current item, they just return the requested item or items.

Methods#

class BackForwardList
get_back_item() BackForwardListItem | None#

Returns the item that precedes the current item.

get_back_list() list[BackForwardListItem]#

Obtain the list of items preceding the current one.

get_back_list_with_limit(limit: int) list[BackForwardListItem]#

Obtain a list up to some number of items preceding the current one.

Parameters:

limit – the number of items to retrieve

get_current_item() BackForwardListItem | None#

Returns the current item in back_forward_list.

get_forward_item() BackForwardListItem | None#

Returns the item that follows the current item.

get_forward_list() list[BackForwardListItem]#

Obtain the list of items following the current one.

get_forward_list_with_limit(limit: int) list[BackForwardListItem]#

Obtain a list up to some number of items following the current one.

Parameters:

limit – the number of items to retrieve

get_length() int#

Obtain the amount of items in the list.

get_nth_item(index: int) BackForwardListItem | None#

Returns the item at a given index relative to the current item.

Parameters:

index – the index of the item

Signals#

class BackForwardList.signals
changed(item_added: BackForwardListItem | None = None, items_removed: Any = None) None#

The type of the None singleton.

Parameters: