Fix: move dom event block to top

This commit is contained in:
eight 2018-09-02 12:38:30 +08:00
parent ae60293e00
commit d28520490a

View File

@ -6,6 +6,10 @@ var linterReport = (() => {
const cms = new Map();
const helpDialog = createLinterHelpDialog(getIssues);
document.addEventListener('DOMContentLoaded', () => {
$('#lint-help').addEventListener('click', helpDialog.show);
}, {once: true});
linter.onChange((annotationsNotSorted, annotations, cm) => {
let table = cms.get(cm);
if (!table) {
@ -33,10 +37,6 @@ var linterReport = (() => {
updateCount();
});
document.addEventListener('DOMContentLoaded', () => {
$('#lint-help').addEventListener('click', helpDialog.show);
}, {once: true});
return {refresh};
function updateCount() {