mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-03 03:56:26 +02:00
parent
f5699a1bf3
commit
eff86ce4ed
6 changed files with 40 additions and 7 deletions
|
@ -57,13 +57,16 @@
|
|||
window.setTimeout(() => node.focus(), 1);
|
||||
let lastResults = [];
|
||||
node.addEventListener("input", function(){
|
||||
this.search();
|
||||
});
|
||||
node.search = function(){
|
||||
const search = this.value;
|
||||
const results = search? scope.search(search): [];
|
||||
searchListeners.forEach(function(callback){
|
||||
callback({search, results, lastResults});
|
||||
});
|
||||
lastResults = results;
|
||||
});
|
||||
};
|
||||
return node;
|
||||
};
|
||||
scope.on = function(callback){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue