@php-wasm/web 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.htaccess ADDED
@@ -0,0 +1,5 @@
1
+ AddType application/wasm .wasm
2
+
3
+ <FilesMatch "iframe-worker.html$">
4
+ Header set Origin-Agent-Cluster: ?1
5
+ </FilesMatch>
@@ -0,0 +1,18 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head></head>
4
+ <body style="padding: 0; margin: 0">
5
+ <script>
6
+ const fileName = new URL(document.location).searchParams.get('scriptUrl');
7
+ const escapedFileName = fileName
8
+ .split('/')
9
+ .pop()
10
+ .split('?')[0]
11
+ .replace(/[^a-zA-Z0-9\.\-_]/g, '');
12
+ const script = document.createElement('script');
13
+ script.type = 'module';
14
+ script.src = `./${escapedFileName}`;
15
+ document.body.appendChild(script);
16
+ </script>
17
+ </body>
18
+ </html>