marijnh/CodeMirror2 — pull request #698 by repenaxa (2012-08-04 14:29:30+00:00)
Title: Migrate from innerHTML to DOM bindings / fragments

This change migrates entire codemirror.js from markup emitting / parsing to using pure DOM bindings and fragments.

Following are the benefits as I see them:

- x2 execution speed up (tested on Chrome in getHTML call sites; I would expect it to be not less on modern FF, Opera and IE)
- innerHTML is only used in 'removeChildren()'. I.e. better XSS resistance.
- Absence of getElementById (better code isolation)

Todos:
codemirror.js no longer uses escaping, but the code is needed for modules / tests. Should probably be moved out.

Tests:
measureEndOfLine and moveV fail on Opera (as in the original version though)