Skip to content

CodeLens hints for JavaScript methods called from C # #4315

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


It's difficult to see where JavaScript methods are called in a Blazor project using the recommended approach for interop between C# and JS.

Consider the following code used in a Blazor project:

public async Task GetUserTypeAsync()
{
   var user = await jsRuntime.InvokeAsync("MyJS.getUserType");
   return user;
}

When viewing the MyJS file, it would be helpful if there were CodeLens hints showing usages of the getUserType method and clickable to see where, similar to what is shown in C# files for reference counts. The current workaround is to highlight the method name and Ctrl+Shift+F to search the solution for results.


Original Comments

Feedback Bot on 4/6/2021, 01:23 AM:

Thank you for taking the time to provide your suggestion. We will do some preliminary checks to make sure we can proceed further. We'll provide an update once the issue has been triaged by the product team.

Metadata

Metadata

Assignees

No one assigned

    Labels

    author: migration bot 🤖The issue was created by a issue mover bot. The author may not be the actual authorenhancementSmall improvement request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions