diff options
author | jcgregorio <jcgregorio@google.com> | 2014-07-07 06:56:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-07-07 06:56:44 -0700 |
commit | 3ef04532990603888567426dc6275d81f37c7cce (patch) | |
tree | 07ee95dab755506a1d4977d8d8938837fcb9fe7c /experimental | |
parent | 8119e6a85d5e94a9297ce2b0c577c9025e96746d (diff) |
Fix history handling for workspaces, issue with M36
BUG=skia:
R=mtklein@google.com
Author: jcgregorio@google.com
Review URL: https://codereview.chromium.org/363003004
Diffstat (limited to 'experimental')
-rw-r--r-- | experimental/webtry/res/js/webtry.js | 10 | ||||
-rw-r--r-- | experimental/webtry/templates/workspace.html | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/experimental/webtry/res/js/webtry.js b/experimental/webtry/res/js/webtry.js index b24501e143..b673e09239 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); } })(); diff --git a/experimental/webtry/templates/workspace.html b/experimental/webtry/templates/workspace.html index 9694a357b1..cb7a82740b 100644 --- a/experimental/webtry/templates/workspace.html +++ b/experimental/webtry/templates/workspace.html @@ -19,7 +19,8 @@ </section> <script type='text/javascript'> - var history = {{.Tries}}; + var history_ = {{.Tries}}; + console.log(history_); </script> <script type='text/javascript'> // Set the workspace name so run.js also updates the history. |