anchor.diff:  // for details. All rights reserved. Use of this source code is governed by a
   // BSD-style license that can be found in the LICENSE file.
   import 'dart:html';
  -
  +import 'dart:math' show Random;
   ButtonElement genButton;
   
   void main() {
  
positive.code:   }
  }
  
  void setBadgeName(String newName) {
    querySelector('#badgeName').text = newName;
  }
  
  void generateBadge(Event e) {
    setBadgeName('Anne Bonney');
  }
negative.code: 
  void updateBadge(Event e) {
    String inputName = (e.target as InputElement).value;
    setBadgeName(new PirateName(firstName: inputName));
  
    if (inputName.trim().isEmpty) {
      // To do: add some code here.
      genButton..disabled = false
  