diff options
author | Allan Wang <me@allanwang.ca> | 2017-06-25 23:04:43 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-06-25 23:04:43 -0700 |
commit | c4f936a8a43692cca387f00a25cd70bcad2764f2 (patch) | |
tree | 545478c2981252cf099336f2e8d515ed4da615de /app/src/main/assets/js/search.js | |
parent | b6530cc36d049a292fe52ea21893c5362155a3b7 (diff) | |
download | frost-c4f936a8a43692cca387f00a25cd70bcad2764f2.tar.gz frost-c4f936a8a43692cca387f00a25cd70bcad2764f2.tar.bz2 frost-c4f936a8a43692cca387f00a25cd70bcad2764f2.zip |
Half framework of the search view
Diffstat (limited to 'app/src/main/assets/js/search.js')
-rw-r--r-- | app/src/main/assets/js/search.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/assets/js/search.js b/app/src/main/assets/js/search.js index 3d10e6f5..d3b319d4 100644 --- a/app/src/main/assets/js/search.js +++ b/app/src/main/assets/js/search.js @@ -1,10 +1,13 @@ //binds callbacks to an invisible webview to take in the search events console.log('Binding Search'); -var page = document.querySelector('#page'); +var _f_page = document.querySelector('#page'); +var _f_input = document.querySelector('#main-search-input') +if (!_f_page || !_f_input) return Frost.emit(1); +Frost.emit(0); var x = new MutationObserver(function(mutations) { Frost.handleHtml(page.innerHTML); }); -x.observe(page, { +x.observe(_f_page, { childList: true, subtree: true }); |