mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2026-01-12 01:59:14 +00:00
⚗️
This commit is contained in:
1
docs/sw.js
Normal file
1
docs/sw.js
Normal file
@@ -0,0 +1 @@
|
||||
importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@b4be701615d284296a4a1aaa852db02f139969ee/index.js')
|
||||
4
index.js
4
index.js
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user