Skip to content

[Blazor] Breaking changes in IJSRuntime and IJSObjectReference #61621

Open
@MackinnonBuck

Description

@MackinnonBuck

Summary

The IJSRuntime and IJSObjectReference interfaces were recently augmented in .NET 10 with new methods:

  • InvokeNewAsync
  • GetValueAsync
  • SetValueAsync

However, adding new members to interfaces is a breaking change that will cause external implementations to throw a TypeLoadException until they get updated to implement the new members.

Possible solution

Change these new methods to be "default interface methods" and have the default implementation throw an exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions