anchor.diff:  }
   
   void setBadgeName(PirateName newName) {
  +  if (newName == null) {
  +    return;
  +  }
     querySelector('#badgeName').text = newName.pirateName;
  +  window.localStorage[TREASURE_KEY] = newName.jsonString;
  +}
  +
  +PirateName getBadgeNameFromStorage() {
  +  String storedName = window.localStorage[TREASURE_KEY];
  +  if (storedName != null) {
  +    return new PirateName.fromJSON(storedName);
  +  } else {
  +    return null;
  +  }
   }
   
   void generateBadge(Event e) {
  
positive.code:   // Getter.
    String get pirateName =>
        _firstName.isEmpty ? '' : '$_firstName the $_appellation';
  }
negative.code: // BSD-style license that can be found in the LICENSE file.
  import 'dart:html';
  import 'dart:math' show Random;
  import 'dart:convert' show JSON;
  
  ButtonElement genButton;
  
  final String TREASURE_KEY = 'pirateName';
  
  void main() {
    // Your app starts here.
    querySelector('#inputName').onInput.listen(updateBadge);
    genButton = querySelector('#generateButton');
    genButton.onClick.listen(generateBadge);
    setBadgeName(getBadgeNameFromStorage());
  }
  
  void updateBadge(Event e) {
  