Skip to content

IJSInProcessObjectReference can't be imported with SetupModule #484

@KristofferStrube

Description

@KristofferStrube

Is the feature request related to a problem? Please elaborate.

The SetupModule extension for setting up an imported JS module only supports IJSObjectReference but you can also import modules of types IJSInProcessObjectReference and IJSUnmarshalledObjectReference.

The suggested solution

IJSInProcessObjectReference and IJSUnmarshalledObjectReference are derived from IJSObjectReference so I think it should be possible to support this with minor changes.

Describe any alternative solutions

If we can not use that they are derived interfaces to IJSObjectReference then it could just be implemented like the module setup feature for IJSObjectReference.

Additional context

I don't think a lot of people use this way of importing modules so might not be a priority.

Currently, I just do the following instead:

TestContext.JSInterop.Setup<IJSInProcessObjectReference>("import", "./_content/MyPath/MyFile.js");

Might also be related to the last bit in this old issue #233 where we quickly mentioned IJSInProcessObjectReference

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions