Skip to content

JSInvalidThreadAccessException class

An exception that was caused by an attempt to access a JavaScript value without any JSValueScope established on the current thread, or from a thread associated with a different environment / root scope.

C#
public class JSInvalidThreadAccessException : InvalidOperationException

Public Members

namedescription
JSInvalidThreadAccessException(…)Creates a new instance of JSInvalidThreadAccessException with a current scope and message. (2 constructors)
CurrentScope { get; }Gets the scope associated with the current thread (Current) when the exception was thrown, or null if there was no scope for the thread.
TargetScope { get; }Gets the scope of the value (Scope) that was being accessed when the exception was thrown, or null if a static operation was attempted.

Remarks

All JavaScript values are created within a scope that is bound to the thread that runs the JS environment. They can only be accessed from the same thread and only as long as the scope is still valid (not disposed).

See Also

Released under the MIT license