Merge pull request #12962 from NYPL-Simplified/service_worker_api_cache_add_all

service_worker_api: Fixed cache.addAll argument.
This commit is contained in:
Paul van Brenk
2016-11-29 15:53:54 -08:00
committed by GitHub
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ interface Cache {
*
* @param request An array of Request objects you want to add to the cache.
*/
addAll(...request: Array<Request | string>): Promise<void>;
addAll(requests: Array<Request | string>): Promise<void>;
/**
* Adds additional key/value pairs to the current Cache object.
@@ -35,7 +35,7 @@ self.addEventListener('install', function(event: InstallEvent) {
self.addEventListener('install', function(event: InstallEvent) {
event.waitUntil(
self.caches.open('v1').then(function(cache) {
return cache.addAll(
return cache.addAll([
'/sw-test/',
'/sw-test/index.html',
'/sw-test/style.css',
@@ -46,7 +46,7 @@ self.addEventListener('install', function(event: InstallEvent) {
'/sw-test/gallery/bountyHunters.jpg',
'/sw-test/gallery/myLittleVader.jpg',
'/sw-test/gallery/snowTroopers.jpg'
);
]);
})
);
});