function _updateDOM(previousDOM, editor, changeList) {
        if (!allowIncremental) {
            changeList = undefined;
        }
        var updater = new DOMUpdater(previousDOM, editor, changeList);
        var result = updater.update();
        if (!result) {
            return { errors: updater.errors };
        }

        var edits = HTMLDOMDiff.domdiff(result.oldSubtree, result.newSubtree);

        // We're done with the nodeMap that was added to the subtree by the updater.
        if (result.newSubtree !== result.newDOM) {
            delete result.newSubtree.nodeMap;
        }

        return {
            dom: result.newDOM,
            edits: edits,
            _wasIncremental: updater.isIncremental // for unit tests only
        };
    }
@private
Builds a new DOM for the current state of the editor, diffs it against the
previous DOM, and generates a DOM edit list that can be used to replay the
diffs in the browser.
@param {Object} previousDOM The HTMLSimpleDOM corresponding to the previous state of the editor.
    Note that in the case of an incremental edit, this will be mutated to create the new DOM
    (by swapping out the subtree corresponding to the changed portion).
@param {Editor} editor The editor containing the instrumented HTML.
@param {Array=} changeList If specified, a CodeMirror changelist reflecting all the
    text changes in the editor since previousDOM was built. If specified, we will
    attempt to do an incremental update (although we might fall back to a full update
    in various cases). If not specified, we will always do a full update.
@return {{dom: Object, edits: Array}} The new DOM representing the current state of the
    editor, and an array of edits that can be applied to update the browser (see
    HTMLDOMDiff for more information on the edit format).