JSObjectReferenceExtensions.SetValueAsync<TValue> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Updates the value of the specified JavaScript property asynchronously. If the property is not defined on the target object, it will be created.
public static System.Threading.Tasks.ValueTask SetValueAsync<TValue>(this Microsoft.JSInterop.IJSObjectReference jsObjectReference, string identifier, TValue value, TimeSpan timeout);
static member SetValueAsync : Microsoft.JSInterop.IJSObjectReference * string * 'Value * TimeSpan -> System.Threading.Tasks.ValueTask
<Extension()>
Public Function SetValueAsync(Of TValue) (jsObjectReference As IJSObjectReference, identifier As String, value As TValue, timeout As TimeSpan) As ValueTask
Type Parameters
- TValue
JSON-serializable argument type.
Parameters
- jsObjectReference
- IJSObjectReference
The IJSObjectReference.
- identifier
- String
An identifier for the property to set. For example, the value "someScope.someProp"
will update the property someScope.someProp
.
- value
- TValue
JSON-serializable value.
- timeout
- TimeSpan
The duration after which to cancel the async operation. Overrides default timeouts (DefaultAsyncTimeout).
Returns
A ValueTask that represents the asynchronous invocation operation.