anchor.diff:        var containers = document.getElementsByClassName('container');
         for (var i = 0; i < containers.length; i++) {
           var container = containers[i];
  -        container.addEventListener('click',
  -          toggler(container.nextElementSibling), false);
  -       container.nextElementSibling.hidden = true;
  -      };
  +        container.querySelector('.details').addEventListener('click',
  +          toggler(container.querySelector('.contents')), false);
  +        container.querySelector('.contents').hidden = true;
  +      }
  +
  +      function sortBySize() {
  +        var toSort = document.querySelectorAll('.contents');
  +        for (var i = 0; i < toSort.length; ++i) {
  +          sortNodes(toSort[i], function(a, b) {
  +            if (a[1] !== b[1]) {
  +              return a[1] > b[1] ? -1 : 1;
  +            }
  +            return a[2] === b[2] ? 0 : a[2] > b[2] ? 1 : -1;
  +          });
  +        }
  +      }
  +
  +      function findSize(node) {
  +        var size = 0;
  +        var details = node.querySelector('.details');
  +        if (details) {
  +          var sizeElement = details.querySelector('.size');
  +          if (sizeElement) {
  +            size = parseInt(sizeElement.textContent);
  +          } else {
  +            // For classes, sum up the contents for sorting purposes.
  +            var kind = details.querySelector('.kind');
  +            if (kind && kind.textContent === 'class') {
  +              var contents = node.querySelector('.contents');
  +              if (contents) {
  +                var child = contents.firstElementChild;
  +                while (child) {
  +                  size += findSize(child);
  +                  child = child.nextElementSibling;
  +                }
  +              }
  +            }
  +          }
  +        }
  +        return size;
  +      }
  +
  +      function findName(node) {
  +        var name = '';
  +        var nameNode = node.querySelector('.name');
  +        if (nameNode) {
  +          return nameNode.textContent;
  +        }
  +        return node.textContent;
  +      }
  +      function sortNodes(node, fn) {
  +        var items = [];
  +        var child = node.firstElementChild;
  +        while (child) {
  +          items.push([child, findSize(child), findName(child)]);
  +          child = child.nextElementSibling;
  +        }
  +        items.sort(fn);
  +        for (var i = 0; i < items.length; ++i) {
  +          node.appendChild(items[i][0]);
  +        }
  +      }
  +      document.querySelector('.sort_by_size').addEventListener('click',
  +          function() {
  +            sortBySize();
  +          }, false);
       </script>
     </body>
   </html>""");
  
positive.code:         extraString].join(' ');
  
      if (contents != null) {
        buffer.write('\n');
        buffer.write(div("+$describe", cls: "container"));
        buffer.write('\n');
        buffer.write('<div class="contained">');
        if (contents.isEmpty) {
          buffer.writeln("No members");
        }
        for (InfoNode subElementDescription in contents) {
          subElementDescription.emitHtml(programInfo, buffer);
        }
        buffer.write("</div>");
      } else {
        buffer.writeln(div('$describe', cls: "element"));
      }
  
negative.code:   <head>
      <title>Dart2JS compilation information</title>
         <style>
          code {margin-left: 20px; display: block; white-space: pre; }
          div.container, div.contained, div.element, div.attr {
            margin-top:0px;
            margin-bottom: 0px;
          }
          div.container, div.element, div.attr {
            white-space: nowrap;
          }
          .contents {
            margin-left: 20px;
          }
          div.contained {margin-left: 20px;}
          div {/*border: 1px solid;*/}
          span.kind {}
          span.modifiers {font-weight:bold;}
          span.name {font-weight:bold; font-family: monospace;}
          span.type {font-family: monospace; color:blue;}
         </style>
       </head>
       <body>
  