bookmarks.create()

Creates a bookmark or folder under the specified parentId. If url is null or missing, a folder will be created.

Syntax

browser.bookmarks.create(
  bookmark,              // CreateDetails
  function(result) {...} // optional function
)

Parameters

bookmark
bookmarks.CreateDetails.

Values of this type are objects. They contain the following properties:

parentIdOptional
string. Defaults to the Other Bookmarks folder.
indexOptional
integer. Index position of this bookmark or folder under its parent.
titleOptional
string. The title of the bookmark, or name of a folder if a folder is being created.
urlOptional
string. If this is omitted or is null, a folder will be created instead of a bookmark.
callbackOptional
function. The function is passed the following arguments:
result
bookmarks.BookmarkTreeNode. The node that was created.

Browser compatibility

EdgeFirefoxChromeOpera
Basic support?45.0Yes33
Firefox
Basic supportNo

Examples

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.

Document Tags and Contributors

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