class SearchModule { static init() { const searchInput = DOM.get('.search-input'); searchInput.on(DOM.Events.KeyPress, (e) => { const value = CDElement.get(e.target).getValue(); if(e.key === DOM.Keys.Enter && !CDUtils.isEmpty(value)) ClassListModule.setQuery(value, true); }); searchInput.on(DOM.Events.Input, (e) => { const value = CDElement.get(e.target).getValue(); if(CDUtils.isEmpty(value)) ClassListModule.setQuery(value, true); }); } } window_.on(DOM.Events.Load, (e) => { SearchModule.init(); });