MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Browser / removeFavorite

Function removeFavorite

wvbrowser_ui/controls_ui/favorites.js:36–53  ·  view source on GitHub ↗
(key, callback)

Source from the content-addressed store, hash-verified

34}
35
36function removeFavorite(key, callback) {
37 queryDB((db) => {
38 let transaction = db.transaction(['favorites'], 'readwrite');
39 let favoritesStore = transaction.objectStore('favorites');
40 let removeFavoriteRequest = favoritesStore.delete(key);
41
42 removeFavoriteRequest.onerror = function(event) {
43 console.log(`Could not remove favorite with key: ${key}`);
44 console.log(event.target.error.message);
45 };
46
47 removeFavoriteRequest.onsuccess = function(event) {
48 if (callback) {
49 callback();
50 }
51 };
52 });
53}
54
55function getFavoritesAsJson(callback) {
56 queryDB((db) => {

Callers 2

messageHandlerFunction · 0.70
toggleFavoriteFunction · 0.70

Calls 1

queryDBFunction · 0.85

Tested by

no test coverage detected