()
| 15 | focusedResult: -1, |
| 16 | isOpen: false, |
| 17 | prepare() { |
| 18 | if (!this.searchIndexInitialized) |
| 19 | fetch('/search-data.json') |
| 20 | .then(data => data.json()) |
| 21 | .then(json => { |
| 22 | const documents = json.searchIndex.map( |
| 23 | ({ url, searchTokens, ...data }) => ({ |
| 24 | id: url, |
| 25 | content: deserializeTokens(searchTokens), |
| 26 | rawContent: searchTokens, |
| 27 | url, |
| 28 | ...data, |
| 29 | }) |
| 30 | ); |
| 31 | this.searchIndex = new DocumentIndex(documents); |
| 32 | this.searchDocuments = search(this.searchIndex); |
| 33 | this.searchIndexInitialized = true; |
| 34 | }); |
| 35 | }, |
| 36 | open() { |
| 37 | this.prepare(); |
| 38 | this.initializeSearchIconAnimation(); |
nothing calls this directly
no test coverage detected