---
title: "addItems(_:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webhistory/additems(_:)"
---

# addItems(_:)

Inserts or updates the specified items in the web history.

## Declaration

```swift
func addItems(_ newItems: [Any]!)
```

## Parameters

- `newItems`: An array of web history items to add. If an item in the array already exists in the web history this method replaces the existing item, so that the last-visited date for the item is updated.

## Discussion

Discussion When successful, this method posts a notification (WebHistoryItemsAddedNotification).

## See Also

### Adding and Removing History Items

- [removeItems(_:)](webkit/webhistory/removeitems(_:).md)
- [removeAllItems()](webkit/webhistory/removeallitems().md)
