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

Unified Diff: experimental/webtry/res/js/webtry.js

Issue 363003004: Fix history handling for workspaces, issue with M36 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months 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 | « no previous file | experimental/webtry/templates/workspace.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/webtry/res/js/webtry.js
diff --git a/experimental/webtry/res/js/webtry.js b/experimental/webtry/res/js/webtry.js
index b24501e14363f9b235b69f25f47f84eb9a902a36..b673e09239e186fe08151dde647567a1e2e393f5 100644
--- a/experimental/webtry/res/js/webtry.js
+++ b/experimental/webtry/res/js/webtry.js
@@ -11,7 +11,7 @@
* namespace. If workspaceName is the empty string then we know we aren't
* running on a workspace page.
*
- * If we are on a workspace page we also look for a 'history'
+ * If we are on a workspace page we also look for a 'history_'
* variable in the global namespace which contains the list of tries
* that are included in this workspace. That variable is used to
* populate the history list.
@@ -286,9 +286,9 @@
}
// Add the images to the history if we are on a workspace page.
- if (tryHistory && history) {
- for (var i=0; i<history.length; i++) {
- addToHistory(history[i].hash, '/i/'+history[i].hash+'.png');
+ if (tryHistory && history_) {
+ for (var i=0; i<history_.length; i++) {
+ addToHistory(history_[i].hash, '/i/'+history_[i].hash+'.png');
}
}
}
@@ -297,7 +297,7 @@
if (document.readyState != "loading") {
onLoad();
} else {
- this.addEventListener('DOMContentLoaded', onLoad);
+ this.addEventListener('load', onLoad);
}
})();
« no previous file with comments | « no previous file | experimental/webtry/templates/workspace.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698