Use DOMContentLoaded instead of load event for CodeMirror initialization. Closes #1894 (#1898)

This commit is contained in:
Brian Grinstead 2022-11-17 23:29:00 -08:00 committed by GitHub
commit 3ecd131e57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@
const schema = {};
{% endif %}
window.onload = () => {
window.addEventListener("DOMContentLoaded", () => {
const sqlFormat = document.querySelector("button#sql-format");
const readOnly = document.querySelector("pre#sql-query");
const sqlInput = document.querySelector("textarea#sql-editor");
@ -38,5 +38,5 @@
});
}
}
};
});
</script>