MCPcopy Create free account
hub / github.com/nwutils/nw-sample-apps / initCheckbox

Function initCheckbox

frameless-window/frameless_window.js:29–43  ·  view source on GitHub ↗
(checkboxId, titlebar_name, titlebar_icon_url, titlebar_text)

Source from the content-addressed store, hash-verified

27}
28
29function initCheckbox(checkboxId, titlebar_name, titlebar_icon_url, titlebar_text) {
30 var elem = document.getElementById(checkboxId);
31 if (!elem)
32 return;
33 elem.onclick = function() {
34 if (document.getElementById(checkboxId).checked)
35 addTitlebar(titlebar_name, titlebar_icon_url, titlebar_text);
36 else
37 removeTitlebar(titlebar_name);
38 focusTitlebars(true);
39
40 updateContentStyle();
41 updateCheckbox();
42 }
43}
44
45window.onfocus = function() {
46 console.log("focus");

Callers 1

Calls 5

addTitlebarFunction · 0.85
removeTitlebarFunction · 0.85
focusTitlebarsFunction · 0.85
updateContentStyleFunction · 0.85
updateCheckboxFunction · 0.85

Tested by

no test coverage detected