docs: Add guide for CDN and dynamic JavaScript loading in WebAssembly apps#22272
Closed
docs: Add guide for CDN and dynamic JavaScript loading in WebAssembly apps#22272
Conversation
…M apps - Add new wasm-referencing-js.md with detailed guide on all methods - Update toc.yml to include new documentation page - Update wasm-javascript-1.md with cross-reference to new guide Co-authored-by: Jen-Uno <214558326+Jen-Uno@users.noreply.github.com>
|
|
Copilot
AI
changed the title
[WIP] Add documentation for referencing arbitrary JS scripts in WASM
docs: Add comprehensive guide for referencing JavaScript files in WebAssembly apps
Jan 6, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive documentation explaining how to reference and load JavaScript files in Uno Platform WebAssembly applications. The documentation addresses a gap where developers previously had to piece together information from multiple sources.
Key Changes
- New comprehensive guide (
wasm-referencing-js.md) covering four methods for loading JavaScript in WASM apps: embedded local scripts, static web assets, external CDN scripts, and dynamic runtime loading - Navigation updates to integrate the new documentation into the table of contents under the "Embed a JavaScript Component" section
- Cross-references added to existing JavaScript interop documentation for improved discoverability
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
doc/articles/interop/wasm-referencing-js.md |
New 450-line comprehensive guide covering all JavaScript loading methods with code examples, best practices, security considerations, and troubleshooting |
doc/articles/toc.yml |
Added navigation entry for the new guide under "Embed a JavaScript Component" section |
doc/articles/interop/wasm-javascript-1.md |
Added cross-reference tip boxes pointing to the new comprehensive guide |
Contributor
|
|
Remove duplicated content about WasmScripts, wwwroot folders, and basic embedding that's already covered in wasm-javascript-1.md. Focus on CDN loading, dynamic loading, best practices, and troubleshooting. Co-authored-by: jeromelaban <5839577+jeromelaban@users.noreply.github.com>
Copilot
AI
changed the title
docs: Add comprehensive guide for referencing JavaScript files in WebAssembly apps
docs: Add guide for CDN and dynamic JavaScript loading in WebAssembly apps
Jan 6, 2026
Contributor
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type:
📚 Documentation content changes
What is the current behavior? 🤔
No documentation exists explaining how to load JavaScript from CDN or dynamically at runtime in Uno Platform WebAssembly applications. The existing Part 1 walkthrough covers basic embedding with
WasmScriptsandwwwrootfolders, but doesn't cover CDN loading or advanced dynamic loading scenarios.What is the new behavior? 🚀
Added focused guide complementing the existing Part 1 walkthrough, covering advanced JavaScript loading methods:
New Documentation:
wasm-referencing-js.md(215 lines)CDN Loading Methods
index.html, dynamic JS loader, AMD/RequireJSDynamic Runtime Loading
WebAssemblyRuntime.InvokeJSfor runtime script loadingBest Practices
Troubleshooting
Navigation Updates:
toc.ymlunder "Embed a JavaScript Component" sectionwasm-javascript-1.mdwith NOTE boxDocument explicitly references Part 1 for fundamentals to avoid duplication with existing walkthrough covering
WasmScripts,WasmCSS, and basicwwwrootusage.Example usage:
PR Checklist ✅
Other information ℹ️
Documentation simplified based on feedback to avoid duplicating content from the existing Part 1 walkthrough. The guide now focuses exclusively on CDN loading, dynamic loading, and best practices - serving as a complement to the existing documentation rather than a replacement.
Review feedback addressed:
WebAssemblyRuntime.InvokeJSapproach throughoutOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.