Each editor is associated with an instance of Doc, its document. A document
represents the editor content, plus a selection, an undo history, and a mode.
A document can only be associated with a single editor at a time. You can
create new documents by calling the
CodeMirror.Doc(text, mode, firstLineNumber) constructor. The last two
arguments are optional and can be used to set a mode for the document and
make it start at a line number other than 0, respectively.
A parent class for objects that can hold references to JavaScript objects.
It has convenience methods for invoking methods on the JavaScript proxy,
a method to add event listeners to the proxy, and a dispose method.
dispose only needs to be called if event listeners were added to an object.