Skip to content

Add support for wrapping JS interop calls as C# delegates #61673

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

oroztocil
Copy link
Member

@oroztocil oroztocil commented Apr 24, 2025

This is a work-in-progress implementation of AsAsyncFunction extension method for IJSObjectReference. The method creates an asynchronous Func<...> delegate that serves as a C#-native typed wrapper that invokes the referenced JS function via interop.

Sync variant will be added later.

Full PR description will be added after we finalize implementation design.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Apr 24, 2025
@oroztocil oroztocil force-pushed the oroztocil/js-interop-function-object-reference branch from 5cdd2a7 to 50fb6ee Compare April 24, 2025 15:47
@oroztocil oroztocil requested a review from javiercn April 24, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant