Skip to content

Enable getting IJSObjectReference to a JS function in Blazor interop #61453

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

oroztocil
Copy link
Member

@oroztocil oroztocil commented Apr 11, 2025

  • Relaxes the condition in Microsoft.JSInterop.ts so that you can retrieve an IJSObjectReference pointing to a JavaScript function value (either via GetValueAsync<IJSObjectReference> or InvokeAsync<IJObjectReference> call to a JS function that returns a function). You can use such reference e.g. to set a handler for something on the JS-side.

  • Adds a case to the test app that shows that this works.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-blazor Includes: Blazor, Razor Components label Apr 11, 2025
@oroztocil oroztocil requested a review from javiercn April 11, 2025 14:55
@oroztocil oroztocil marked this pull request as ready for review April 11, 2025 16:11
@oroztocil oroztocil requested a review from a team as a code owner April 11, 2025 16:11
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.

2 participants