Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

bookmarks.remove()

The bookmarks.remove() method removes a single bookmark or an empty bookmark folder.

If the bookmark item could not be found or was a non-empty folder, runtime.lastError is set, and you can check for it in the callback.

Syntax

chrome.bookmarks.remove(
  id,                 // string
  function() {...}    // optional function
)

This API is also available as browser.bookmarks.remove() in a version that returns a promise.

Parameters

id
A string specifying the ID of the bookmark or empty folder to remove.
callback Optional
A function to be called once the specified bookmark or folder has been removed. It is not passed any parameters.

Browser compatibility

Chrome Edge Firefox Firefox for Android Opera
Basic support Yes No 45.0 No 33

Examples

This example removes a

function onRemoved() {
  if (chrome.runtime.lastError) {
    console.log(chrome.runtime.lastError);
  } else {
    console.log("bookmark item removed!");
  }

}

chrome.bookmarks.remove(bookmarkItemId");

Example add-ons

Acknowledgements

This API is based on Chromium's chrome.bookmarks API. This documentation is derived from bookmarks.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

 Contributors to this page: Makyen, wbamberg, Sheppy
 Last updated by: Makyen,