Rename onSelected() to afterNavigated()

This commit is contained in:
Folyd 2020-04-17 18:50:43 +08:00
parent 28f7b0b538
commit a7913dceb9
2 changed files with 4 additions and 4 deletions

View file

@ -36,7 +36,7 @@ omnibox.bootstrap({
return content;
}
},
onSelected: (query, result) => {
afterNavigated: (query, result) => {
HistoryCommand.record(query, result);
}
});

View file

@ -43,7 +43,7 @@ Omnibox.prototype.parse = function(input) {
return {query: query.join(" "), page};
};
Omnibox.prototype.bootstrap = function({onSearch, onFormat, onAppend, beforeNavigate, onSelected}) {
Omnibox.prototype.bootstrap = function({onSearch, onFormat, onAppend, beforeNavigate, afterNavigated}) {
this.globalEvent = new QueryEvent({onSearch, onFormat, onAppend});
this.setDefaultSuggestion(this.defaultSuggestionDescription);
let results;
@ -94,8 +94,8 @@ Omnibox.prototype.bootstrap = function({onSearch, onFormat, onAppend, beforeNavi
}
}
if (onSelected) {
onSelected(this.cachedQuery, result);
if (afterNavigated) {
afterNavigated(this.cachedQuery, result);
}
this.setDefaultSuggestion(this.defaultSuggestionDescription);