Repository navigation
[Core] Add extension methods for IJSObjectReference - #5504
Merged
Denis Voituron (MSFT) (dvoituron-msft) merged 1 commit intoOct 22, 2026
Merged
Denis Voituron (MSFT) (dvoituron-msft) merged 1 commit into
Denis Voituron (MSFT) (dvoituron-msft) merged 1 commit into
Conversation
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
October 22, 2026 09:50
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused implementation matches its documented behavior, has corresponding unit coverage, and has no identified blocking issues.
No open issues 🎉
What changed in this PR
Adds internal IJSObjectReference extensions to simplify JavaScript interop in the component library and centralize handling of expected exceptions.
Changes:
- Adds void and value-returning helpers, with
Tryvariants that report invocation success. - Handles disconnection, cancellation, and invalid-operation exceptions while propagating other failures.
- Adds tests for argument forwarding, returned values, handled exceptions, and JavaScript error propagation.
| File | Description |
|---|---|
| tests/Core/Extensions/JSObjectReferenceExtensionsTests.cs | Tests invocation forwarding, return values, and exception behavior. |
| src/Core/Extensions/JSObjectReferenceExtensions.cs | Adds four documented interop helpers with shared exception handling. |
Review effort: Balanced
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.9%
Microsoft.FluentUI.AspNetCore.Components.Charts - 100%
|
Denis Voituron (MSFT) (dvoituron-msft)
deleted the
users/dvoituron/objectreference-invoke
branch
October 22, 2026 10:13
6 of 10 tasks
This was referenced Nov 16, 2026
Merged
Closed
This was referenced Nov 30, 2026
Merged
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.
[Core] Add extension methods for IJSObjectReference
Introduce extension methods for
IJSObjectReferenceto simplify invoking JavaScript functions, handling exceptions gracefully.This enhancement improves the usability of JavaScript interop in the application.