This commit is contained in:
Nicolas Lepage 2019-12-02 17:04:06 +01:00
parent 8c1776952b
commit 21aa954d1c
No known key found for this signature in database
GPG Key ID: B0879E35E66D8F6F
2 changed files with 2 additions and 3 deletions

1
docs/sw.js Normal file
View File

@ -0,0 +1 @@
importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@b4be701615d284296a4a1aaa852db02f139969ee/index.js')

View File

@ -1,7 +1,5 @@
const swUrl = 'https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@b4be701615d284296a4a1aaa852db02f139969ee/index.js'
window.wasmhttp = {
register: async (wasm, { scope, base = '' } = {}) => {
register: async (wasm, { scope, base = '', swUrl = 'sw.js' } = {}) => {
const options = {}
if (scope) options.scope = scope
//FIXME register once