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

Function updateLockIcon

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

Source from the content-addressed store, hash-verified

324
325// Update lock icon for the active tab
326function updateLockIcon() {
327 if (activeTabId == INVALID_TAB_ID) {
328 return;
329 }
330
331 let activeTab = tabs.get(activeTabId);
332
333 let labelElement = document.getElementById('security-label');
334 if (!labelElement) {
335 refreshControls();
336 return;
337 }
338
339 switch (activeTab.securityState) {
340 case 'insecure':
341 labelElement.className = 'label-insecure';
342 break;
343 case 'neutral':
344 labelElement.className = 'label-neutral';
345 break;
346 case 'secure':
347 labelElement.className = 'label-secure';
348 break;
349 default:
350 labelElement.className = 'label-unknown';
351 break;
352 }
353}
354
355// Update favorite status for the active tab
356function updateFavoriteIcon() {

Callers 1

updateNavigationUIFunction · 0.85

Calls 1

refreshControlsFunction · 0.85

Tested by

no test coverage detected