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

Make JSInterop (@microsoft/dotnet-js-interop) UMD-compatible #38208

Closed
elringus opened this issue Nov 9, 2021 · 3 comments
Closed

Make JSInterop (@microsoft/dotnet-js-interop) UMD-compatible #38208

elringus opened this issue Nov 9, 2021 · 3 comments
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-jsinterop This issue is related to JSInterop in Blazor feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. Status: Resolved

Comments

@elringus
Copy link

elringus commented Nov 9, 2021

Can you please consider supporting UMD for the JSInterop library distributed via NPM (https://www.npmjs.com/package/@microsoft/dotnet-js-interop)?

I'm using this library to implement a single-file UMD dotnet JS runtime to be used in constrained environments (such as web extensions for vscode.dev) and have to replace window global to make it compatible.

@javiercn javiercn added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly feature-blazor-jsinterop This issue is related to JSInterop in Blazor labels Nov 9, 2021
@mkArtakMSFT
Copy link
Member

Thanks for contacting us. This is not something we plan to add support for out of the box.

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. label Nov 9, 2021
@ghost ghost added the Status: Resolved label Nov 9, 2021
@elringus
Copy link
Author

elringus commented Nov 9, 2021

Thanks for contacting us. This is not something we plan to add support for out of the box.

That's unfortunate. With a very basic change (just copy-pasting a UMD header template) that won't add any maintain cost or API changes on your side you could open the library for much wider use cases.

@elringus
Copy link
Author

elringus commented Nov 9, 2021

In case someone find this having similar problem, I've published UMD library based on the original JSInterop: https://www.npmjs.com/package/dotnet-js-interop It can be used in any environment: browser, nodejs, webview, etc.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components feature-blazor-jsinterop This issue is related to JSInterop in Blazor feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. Status: Resolved
Projects
None yet
Development

No branches or pull requests

3 participants