Last active
June 8, 2018 00:31
-
-
Save ykyk1218/53523d355d75a7fee3fe0c4fbc84af96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for seq in event.data["seq"] | |
| console.log "Request: " + seq | |
| fetch(new Request("/#{seq}", {mode: 'no-cors'})).then((response) -> | |
| console.log "after Request: " + seq | |
| caches.open(CACHE_NAME).then((cache) -> | |
| cache.put("/#{seq}", response) | |
| ) | |
| ).catch((err) -> | |
| console.error(err) | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment