---
title: "add(_:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webbackforwardlist/add(_:)"
---

# add(_:)

Inserts an item into the back-forward list, immediately after the current item.

## Declaration

```swift
func add(_ item: WebHistoryItem!)
```

## Parameters

- `item`: A web history item that represents a visited webpage. If item is nil, an doc://com.apple.documentation/documentation/Foundation/NSExceptionName/invalidArgumentException exception is raised.

## Discussion

Discussion Any items following item in the back-forward list are removed. This method also removes items if the capacity of the receiver is exceeded.
