INNER CODE UNIT · JavaScript

closeSearch

mitre-attack/attack-website · attack-search/src/index.js:81

const closeSearch = function () {
  searchInput.val('');
  if (searchService) searchService.clearSession();
  closeFilterDropdowns();
  searchOverlay.hide();
  searchOverlay.addClass('hidden');
};

// Variable to check if search service is loaded
let searchServiceIsLoaded = false;

// Set once the index cannot be built at all. Without it `search` waits for a flag that is
// never going to flip and the parsing spinner runs for as long as the page is open.
let searchServiceUnavailable = false;

// Put the search controls into their unavailable state and explain why on hover.
function markSearchUnavailable(reason) {
  searchServiceUnavailable = true;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…