From c4f936a8a43692cca387f00a25cd70bcad2764f2 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 25 Jun 2017 23:04:43 -0700 Subject: Half framework of the search view --- app/src/main/assets/js/search.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'app/src/main/assets') 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 }); -- cgit v1.2.3