---
title: "Detect changes in PDF bookmarks using JavaScript | Nutrient"
canonical_url: "https://www.nutrient.io/guides/web/bookmarks/detect-changes/"
md_url: "https://www.nutrient.io/guides/web/bookmarks/detect-changes.md"
last_updated: "2026-06-08T19:21:59.288Z"
description: "Detect changes in PDF bookmarks using JavaScript | guide for Nutrient Web SDK with detailed instructions and code examples."
---

# Detect changes in PDF bookmarks

Managing bookmarks from your code or from the bookmarks sidebar UI will trigger events you can listen to. The [`BookmarksChangeEvent`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#~BookmarksChangeEvent) gets triggered whenever a bookmark is created, updated, or deleted:

```js

instance.addEventListener("bookmarks.change", () => {
  console.log("Your bookmarks changed!");
});

```

If you want more information about how exactly a bookmark has changed, there are several other more fine-grained events you can listen to. You’ll find more details about this in the [API docs](https://www.nutrient.io/api/web/):

- [`BookmarksCreateEvent`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#~BookmarksCreateEvent) — Emitted whenever new bookmarks are created.

- [`BookmarksUpdateEvent`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#~BookmarksUpdateEvent) — Emitted whenever bookmarks are updated.

- [`BookmarksDeleteEvent`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#~BookmarksDeleteEvent) — Emitted whenever new bookmarks are deleted.

- [`BookmarksLoadEvent`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#~BookmarksLoadEvent) — Emitted whenever bookmarks are loaded from the bookmark provider.

- [`BookmarksWillSaveEvent`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#~BookmarksWillSaveEvent) and [`BookmarksDidSaveEvent`](https://www.nutrient.io/api/web/NutrientViewer.Instance.html#~BookmarksDidSaveEvent) — Emitted before and after bookmarks are saved to the bookmark provider.
---

> Part of [JavaScript PDF bookmark library](/guides/web/bookmarks.md)

## Related pages

- [PDF bookmarks in our JavaScript PDF viewer](/guides/web/bookmarks/built-in-ui.md)
- [Create bookmarks in PDF using JavaScript](/guides/web/features/bookmarks.md)
- [Edit bookmarks in PDFs using JavaScript](/guides/web/bookmarks/edit.md)
- [Remove bookmarks in PDFs using JavaScript](/guides/web/bookmarks/remove.md)

