Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS: Load WASM from a specified path #91

Open
blackspherefollower opened this issue Oct 13, 2021 · 0 comments
Open

JS: Load WASM from a specified path #91

blackspherefollower opened this issue Oct 13, 2021 · 0 comments
Assignees

Comments

@blackspherefollower
Copy link
Contributor

Feature Description

Right now, the path to the Buttplug JS files is fixed, so if loading the library outside of the normal browser environment (user-scripts, etc) or you want to explicitly load the JS files from your own server (without using webpack, etc), you're going to struggle.

Commit fe66645 tried to achieve this, but actually prevented the fixed location loading from working as well as not actually working for explicit paths due to a mixed content issue (see #88 and #90)

I believe, but could be wrong, that in order for the WASM and supporting JS to be loaded, they need to be isolated from each other (no internal imports of the WASM from JS) so that the browser can perform a module import of the WASM and a separate load of the JS, otherwise the the fetch of one results in MIME type errors when the JS pulls in the WASM or vice versa.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants