MCPcopy
hub / github.com/SeleniumHQ/selenium / selectionChange

Function selectionChange

third_party/js/qunit/qunit.js:6877–6895  ·  view source on GitHub ↗
(evt)

Source from the content-addressed store, hash-verified

6875 // Avoid any dropdown rendering here as this is used by toolbarModuleFilter()
6876 // during the initial render, which should not delay test execution.
6877 function selectionChange(evt) {
6878 var checkbox = evt && evt.target || null;
6879 if (checkbox) {
6880 // Update internal state
6881 if (checkbox.checked) {
6882 dropdownData.selectedMap.set(checkbox.value, checkbox.parentNode.textContent);
6883 } else {
6884 dropdownData.selectedMap.delete(checkbox.value);
6885 }
6886
6887 // Update UI state
6888 toggleClass(checkbox.parentNode, 'checked', checkbox.checked);
6889 }
6890 var textForm = dropdownData.selectedMap.size ? dropdownData.selectedMap.size + ' ' + (dropdownData.selectedMap.size === 1 ? 'module' : 'modules') : 'All modules';
6891 moduleSearch.placeholder = textForm;
6892 moduleSearch.title = 'Type to search through and reduce the list.';
6893 resetButton.disabled = !dropdownData.isDirty();
6894 clearButton.style.display = dropdownData.selectedMap.size ? '' : 'none';
6895 }
6896 return moduleFilter;
6897 }
6898 function appendToolbar(beginDetails) {

Callers 1

toolbarModuleFilterFunction · 0.85

Calls 3

toggleClassFunction · 0.85
setMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected