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

Function updateLabelForEntry

wvbrowser_ui/content_ui/settings.js:84–99  ·  view source on GitHub ↗
(elementId, label)

Source from the content-addressed store, hash-verified

82}
83
84function updateLabelForEntry(elementId, label) {
85 let entryElement = document.getElementById(elementId);
86 if (!entryElement) {
87 console.log(`Element with id ${elementId} does not exist`);
88 return;
89 }
90
91 let labelSpan = entryElement.querySelector(`.entry-value span`);
92
93 if (!labelSpan) {
94 console.log(`${elementId} does not have a label`);
95 return;
96 }
97
98 labelSpan.textContent = label;
99}
100
101function init() {
102 window.chrome.webview.addEventListener('message', messageHandler);

Callers 2

messageHandlerFunction · 0.85
loadSettingsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected