INNER CODE UNIT · JavaScript

search

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

const search = async function (query) {
  console.debug(`search -> Received search query: ${query}`);

  // Wait until the search service is loaded, or until we know it never will be.
  while (!searchServiceIsLoaded && !searchServiceUnavailable) {
    console.debug('search -> search index is not loaded...');
    searchParsingIcon.show();
    await new Promise(resolve => setTimeout(resolve, 100));
  }

  if (searchServiceUnavailable) {
    searchParsingIcon.hide();
    return;
  }

  console.debug(`Executing search: ${query}`);
  await searchService.query(query);
  searchParsingIcon.hide();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…