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

Unified Diff: res/js/common.js

Issue 2309423004: Give error-toast a duration argument (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Created 4 years, 3 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
« res/imp/error-toast-sk.html ('K') | « res/imp/error-toast-sk.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: res/js/common.js
diff --git a/res/js/common.js b/res/js/common.js
index fce0ff2bec2d7246f265eafe9648585b4075647b..15fbdb2c396bbe94685459d8587639c0519e4fa4 100644
--- a/res/js/common.js
+++ b/res/js/common.js
@@ -71,10 +71,13 @@ this.sk = this.sk || function() {
* and displays the error messages.
*
*/
- sk.errorMessage = function(message) {
+ sk.errorMessage = function(message, duration) {
var detail = {
message: message,
}
+ if (duration !== undefined) {
+ detail.duration = duration;
jcgregorio 2016/09/06 20:37:01 Just use: detail.duration = duration; Since un
kjlubick 2016/09/06 20:39:37 Done.
+ }
document.dispatchEvent(new CustomEvent('error-sk', {detail: detail, bubbles: true}));
}
« res/imp/error-toast-sk.html ('K') | « res/imp/error-toast-sk.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698