Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(865)

Unified Diff: utils/dartdoc/interact.dart

Issue 8822001: Bunch of dartdoc changes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Default to showing source. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/dartdoc/dartdoc.dart ('k') | utils/dartdoc/static/styles.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/dartdoc/interact.dart
diff --git a/utils/dartdoc/interact.dart b/utils/dartdoc/interact.dart
index dabcfd74c81fa2050573c053dc014310f10bb8a5..81c7b226eaed098048c7b7283350095633a667f1 100644
--- a/utils/dartdoc/interact.dart
+++ b/utils/dartdoc/interact.dart
@@ -11,6 +11,11 @@ main() {
window.on.contentLoaded.add((e) {
for (var elem in document.queryAll('.method, .field')) {
var showCode = elem.query('.show-code');
+
+ // Skip it if we don't have a code link. Will happen if source code is
+ // disabled.
+ if (showCode == null) continue;
+
var pre = elem.query('pre.source');
showCode.on.click.add((e) {
if (pre.classes.contains('expanded')) {
« no previous file with comments | « utils/dartdoc/dartdoc.dart ('k') | utils/dartdoc/static/styles.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698