Skip to content
Snippets Groups Projects
Commit 76f67a32 authored by Vincent Woo's avatar Vincent Woo Committed by GitHub
Browse files

Use document.getElementsByClassName directly

parent 735ed377
No related branches found
No related tags found
Loading
...@@ -6,8 +6,8 @@ import { on } from "../util/event" ...@@ -6,8 +6,8 @@ import { on } from "../util/event"
// garbage collected. // garbage collected.
function forEachCodeMirror(f) { function forEachCodeMirror(f) {
if (!document.body.getElementsByClassName) return if (!document.getElementsByClassName) return
let byClass = document.body.getElementsByClassName("CodeMirror") let byClass = document.getElementsByClassName("CodeMirror")
for (let i = 0; i < byClass.length; i++) { for (let i = 0; i < byClass.length; i++) {
let cm = byClass[i].CodeMirror let cm = byClass[i].CodeMirror
if (cm) f(cm) if (cm) f(cm)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment