Chromium Code Reviews| Index: content/test/data/indexeddb/common.js |
| diff --git a/content/test/data/indexeddb/common.js b/content/test/data/indexeddb/common.js |
| index 2e12d4447e2aec11c2584d2edeb00d7114199a01..d85393a3884df444f24cf809c1b173b1e1c3c772 100644 |
| --- a/content/test/data/indexeddb/common.js |
| +++ b/content/test/data/indexeddb/common.js |
| @@ -147,3 +147,9 @@ function indexedDBTest(upgradeCallback, optionalOpenCallback) { |
| openRequest.onsuccess = optionalOpenCallback; |
| }; |
| } |
| + |
| +if (typeof String.prototype.startsWith != 'function') { |
|
jsbell
2014/03/26 18:16:58
Maybe add a comment that this is a (partial) polyf
jsbell
2014/03/26 18:16:58
Nit: !==
cmumford
2014/03/26 21:40:36
Really? I'll look into that. I can redo this to no
jsbell
2014/03/26 22:49:00
These days it's "bad form" on the Web to extend bu
|
| + String.prototype.startsWith = function (str) { |
| + return this.indexOf(str) == 0; |
|
jsbell
2014/03/26 18:16:58
Nit: ===
|
| + }; |
| +} |