Endle / fireSeqSearch

Prefer var declarations be placed at the top of their scope JS-0102
Anti-pattern
Minor
9 months ago3 years old
All 'var' declarations must be at the top of the function scope
1299    
1300    const raw_json_id = "fireSeqSearchWordcloudRawJson";
1301    var raw_dom = document.getElementById(raw_json_id);
1302    var raw_json = raw_dom.textContent;1303
1304    raw_dom.setAttribute("style", "width: 1000px");
1305    // consoleLogForDebug(raw_json);
All 'var' declarations must be at the top of the function scope
1298    consoleLogForDebug(WordCloud.isSupported);
1299    
1300    const raw_json_id = "fireSeqSearchWordcloudRawJson";
1301    var raw_dom = document.getElementById(raw_json_id);1302    var raw_json = raw_dom.textContent;
1303
1304    raw_dom.setAttribute("style", "width: 1000px");
All 'var' declarations must be at the top of the function scope
1227    WordCloud.minFontSize = minFontSize
1228    WordCloud.stop = function stop () {
1229        if (timer) {
1230            for (var timerId in timer) {1231                window.clearImmediate(timer[timerId])
1232            }
1233        }
All 'var' declarations must be at the top of the function scope
1201                }
1202                escapeTime = (new Date()).getTime()
1203                var drawn = putWord(settings.list[i])
1204                var canceled = !sendEvent('wordclouddrawn', true, {1205                    item: settings.list[i],1206                    drawn: drawn1207                })1208                if (exceedTime() || canceled) {
1209                    stoppingFunction(timer[timerId])
1210                    settings.abort()
All 'var' declarations must be at the top of the function scope
1200                    return
1201                }
1202                escapeTime = (new Date()).getTime()
1203                var drawn = putWord(settings.list[i])1204                var canceled = !sendEvent('wordclouddrawn', true, {
1205                    item: settings.list[i],
1206                    drawn: drawn