Question about IJSObjectReference and the JSRuntime (WebGPU example) #34329
Unanswered
ThreePelleggOmelette
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Can't quite seem to find a direct answer to this, but I'm curious on how the context passing between Asp.NET code and the method invocation of the JS runtime works.
To summarize:
I'm running into a situation where I can invoke methods and retrieve references to JS objects (IJSObjectReference) and can invoke functions on those instances, but if I try to pass them into a later JS method invocation (within the same C# method), I'm getting warnings about them being destroyed, even though I can still invoke method/function calls on them.
So, I'm curious, how do the object references exist, and are functional, from the Asp side but are destroyed on the JS side?
I have been using C# for some time now, but am relatively new to Web based projects.
So feel free to go as in depth as you like :)
Example using WebGPU JS API, with some C# wrappers. Under the hood, each object is just its
GPU
JS equivalent, but as anIJSObjectReference
Beta Was this translation helpful? Give feedback.
All reactions