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

Unified Diff: res/js/common.js

Issue 1144163010: Getting started on the fuzzer web front end. (Closed) Base URL: https://skia.googlesource.com/buildbot@master
Patch Set: Update startsWith polyfill Created 5 years, 7 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 | « fuzzer/templates/titlebar.html ('k') | webtry/templates/titlebar.html » ('j') | 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 ddc35541b25a86a9ec19eea1970227eece98ae04..8bb2b9d57e122a37f8efbc53ab4951b8d2cee8b5 100644
--- a/res/js/common.js
+++ b/res/js/common.js
@@ -583,5 +583,14 @@ this.sk = this.sk || function() {
});
}
+ // Polyfill for String.startsWith from
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith#Polyfill
+ // returns true iff the string starts with the given prefix
+ if (!String.prototype.startsWith) {
+ String.prototype.startsWith = function(searchString, position) {
+ position = position || 0;
+ return this.indexOf(searchString, position) === position;
+ };
+ }
return sk;
}();
« no previous file with comments | « fuzzer/templates/titlebar.html ('k') | webtry/templates/titlebar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698