anchor.diff:      e.returnValue = _unloadConfirmationMessage;
     }
   
  +  // Returns the scroll size of the source.
  +  _ScrollSize get _sourceScrollSize {
  +    final num sourceContentHeight =
  +        _aceEditorSession.callMethod('getDocument').callMethod('getLength') *
  +        _aceEditor['renderer']['lineHeight'];
  +    return new _ScrollSize(_sourceNode.clientHeight, sourceContentHeight);
  +  }
  +  // Returns the scroll size of the output.
  +  _ScrollSize get _outputScrollSize
  +      => new _ScrollSize(_outputNode.clientHeight, _outputNode.scrollHeight);
  +
  +  // Returns the scroll position of the source.
  +  num get _sourceScrollRatio
  +      => _sourceScrollSize.toScrollRatio(
  +             _aceEditorSession.callMethod('getScrollTop'));
  +
  +  // Returns the scroll position of the output.
  +  num get _outputScrollRatio
  +      => _outputScrollSize.toScrollRatio(_outputNode.scrollTop);
  +
  +  // Sets the scroll position of the source.
  +  void _setSourceScrollRatio(num scrollRatio) {
  +    _aceEditorSession.callMethod(
  +        'setScrollTop', [_sourceScrollSize.toScrollTop(scrollRatio)]);
  +  }
  +
  +  // Sets the scroll position of the output.
  +  void _setOutputScrollRatio(num scrollRatio) {
  +    _outputNode.scrollTop = _outputScrollSize.toScrollTop(scrollRatio);
  +  }
  +
     // URL of the AsciiDoc API.
     static final String _ASCIIDOC_TO_HTML_URI = '/api/v1/asciidoc-to-html';
   
  
positive.code: import 'dart:convert';
  import 'dart:html';
  import 'dart:js';
  import 'package:crypto/crypto.dart';
  import 'package:utf/utf.dart';
  
  
negative.code:   // Constructor.
    AsciiDocEditor() {
      // Save demo source text.
      _sourceNode = querySelector('#${_SOURCE_NODE_ID}');
      _demoSourceText = _sourceNode.text.trim();
  
      // Initialize editor.
      _aceEditor = context['ace'].callMethod(
          'edit', [_SOURCE_NODE_ID]);
      // For manual debugging in the console.
      context['aceEditor'] = _aceEditor;
      _aceEditorSession = _aceEditor.callMethod('getSession');
      // _aceEditor.callMethod('setTheme', ['ace/theme/monokai']);
      _aceEditorSession.callMethod(
  