w3c / webextensions

Charter and administrivia for the WebExtensions Community Group (WECG)
Other
576 stars 50 forks source link

Proposal: Remove multiple bookmarks in bookmarks.remove() #640

Open erosman opened 1 week ago

erosman commented 1 week ago

Background

The bookmarks.remove() API allows the removal of a single bookmark.

Extensions dealing with bookmarks would benefit from having the option to remove multiple bookmarks with a single requests, instead of removing them one by one.

Proposal

Update the API to accept string, or array of strings, similar to StorageArea.remove().

let removingBookmark = browser.bookmarks.remove(
  ids              // string, or array of strings
)
carlosjeurissen commented 1 week ago

To add some context. Seems one of the motivations for this proposal is performance. Removing a big amount of bookmarks can take some time.

In this thread, (https://github.com/erosman/support/issues/595) @bilgincoskun mentions:

The main caveats with the current API are: