// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
// 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.

/** Provides client-side behavior for generated docs. */
#library('interact');

#import('../../client/html/html.dart');

main() {
  window.on.contentLoaded.add((e) {
    for (var elem in document.queryAll('.method, .field')) {
      var showCode = elem.query('.show-code');
      var pre = elem.query('pre.source');
      showCode.on.click.add((e) {
        if (pre.classes.contains('expanded')) {
          pre.classes.remove('expanded');
        } else {
          pre.classes.add('expanded');
        }
      });
    }
  });
}
// Copyright (c) 2011, the Dart project authors.  Please see the AUTHORS file
// 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.

/** Provides client-side behavior for generated docs. */
#library('interact');

#import('dart:html');

main() {
  window.on.contentLoaded.add((e) {
    for (var elem in document.queryAll('.method, .field')) {
      var showCode = elem.query('.show-code');
      var pre = elem.query('pre.source');
      showCode.on.click.add((e) {
        if (pre.classes.contains('expanded')) {
          pre.classes.remove('expanded');
        } else {
          pre.classes.add('expanded');
        }
      });
    }
  });
}
Use right path to html lib.
Use right path to html lib.

Review URL: http://codereview.chromium.org//8726038

git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@1899 260f80e4-7a28-3924-810f-c04153c831b5
