mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-10 17:29:10 +00:00
⚗️
This commit is contained in:
parent
8c1776952b
commit
21aa954d1c
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user