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

Function favoriteFromTab

wvbrowser_ui/controls_ui/tabs.js:186–200  ·  view source on GitHub ↗
(tabId)

Source from the content-addressed store, hash-verified

184}
185
186function favoriteFromTab(tabId) {
187 if (!isValidTabId(tabId)) {
188 console.log('Invalid tab ID');
189 return;
190 }
191
192 let tab = tabs.get(tabId);
193 let favicon = tab.favicon == 'img/favicon.png' ? '../controls_ui/' + tab.favicon : tab.favicon;
194 return {
195 uri: tab.uri,
196 uriToShow: tab.uriToShow,
197 title: tab.title,
198 favicon: favicon
199 };
200}
201
202function historyItemFromTab(tabId) {
203 if (!isValidTabId(tabId)) {

Callers 1

toggleFavoriteFunction · 0.85

Calls 1

isValidTabIdFunction · 0.85

Tested by

no test coverage detected