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

Function toggleFavorite

wvbrowser_ui/controls_ui/default.js:600–613  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

598}
599
600function toggleFavorite() {
601 activeTab = tabs.get(activeTabId);
602 if (activeTab.isFavorite) {
603 removeFavorite(activeTab.uri, () => {
604 activeTab.isFavorite = false;
605 updateFavoriteIcon();
606 });
607 } else {
608 addFavorite(favoriteFromTab(activeTabId), () => {
609 activeTab.isFavorite = true;
610 updateFavoriteIcon();
611 });
612 }
613}
614
615function addControlsListeners() {
616 let inputField = document.querySelector('#address-field');

Callers 2

addControlsListenersFunction · 0.85
addTabsListenersFunction · 0.85

Calls 4

updateFavoriteIconFunction · 0.85
addFavoriteFunction · 0.85
favoriteFromTabFunction · 0.85
removeFavoriteFunction · 0.70

Tested by

no test coverage detected