MCPcopy
hub / github.com/philc/vimium / filterCompletions

Function filterCompletions

background_scripts/main.js:720–731  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

718 },
719
720 async filterCompletions(request) {
721 const completer = completers[request.completerName];
722 let response = await completer.filter(request);
723
724 // NOTE(smblott): response contains `relevancyFunction` (function) properties which cause
725 // postMessage, below, to fail in Firefox. See #2576. We cannot simply delete these methods,
726 // as they're needed elsewhere. Converting the response to JSON and back is a quick and easy
727 // way to sanitize the object.
728 response = JSON.parse(JSON.stringify(response));
729
730 return response;
731 },
732
733 refreshCompletions(request) {
734 const completer = completers[request.completerName];

Callers

nothing calls this directly

Calls 2

filterMethod · 0.45
parseMethod · 0.45

Tested by

no test coverage detected