Skip to content

IJSObjectReference.SetValueAsync #67698

Description

@ghorner2

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

using the IJSRefenceObject SetValueAsync(propertyName, propertyValue) on a obj instance fails; with message The value '${r}' is not a function.

yet

using a javascript module and the helper export function set(objectInstance, propertyName, propertyValue) { objectInstance[propertyName] = propertyValue; } calling moduleReference.InvokeVoidAsync with the same obj instance propertyName, propertyValue works.

deep within the blazor.webassembly.js

NOTE: it is also not possible to intercept/debug/step thought the blazor.webassebly.js or gain additional browser console logging output.

Expected Behavior

the property should have its value set or that property value can't be set

Steps To Reproduce

use the SetValueAsync on a object instance from the IJSObjectReference from within C#

Exceptions (if any)

No bundled module (The value '???' is not a function. Error: The value '???' is not a function. at https://localhost:50550/_framework/blazor.webassembly.js:1:510 at u.resolveInvocationHandler (https://localhost:50550/_framework/blazor.webassembly.js:1:1428) at S (https://localhost:50550/_framework/blazor.webassembly.js:1:6447) at w.processJSCall (https://localhost:50550/_framework/blazor.webassembly.js:1:4440) at w.beginInvokeJSFromDotNet (https://localhost:50550/_framework/blazor.webassembly.js:1:4125) at Object.en [as invokeJSJson] (https://localhost:50550/_framework/blazor.webassembly.js:1:59109) at https://localhost:50550/_framework/dotnet.runtime.a6jcqbs390.js:3:34586 at Mc (https://localhost:50550/_framework/dotnet.runtime.a6jcqbs390.js:3:175836) at https://localhost:50550/_framework/dotnet.native.veuqw8a0w9.wasm:wasm-function[298]:0x1f797 at https://localhost:50550/_framework/dotnet.native.veuqw8a0w9.wasm:wasm-function[222]:0x1ca98)

.NET Version

10.0

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issue

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions