You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i have a small question regarding the binding of variables. In this method:
internal override bool TryGetBinding(BindingName name, bool strict, [NotNullWhen(true)] out JsValue? value)
{
if (_dictionary?.TryGetValue(name.Key, out var binding) == true)
{
value = binding.Value;
return true;
}
value = null;
return false;
}
from the DeclarativeEnvironment, the binding is returned as an out variable. The binding variable is of type Binding, and this class has a property called Mutable.
I would like to know if it is somehow possible to access the value of this property from outside of Jint, for example, from C# code that consumes the Jint library?
For example:
Currently i have something like this in my C# code:
JsValue? value = scope.GetBindingValue(name);
if (value == null) continue;
if (value.IsObject() || value.IsSymbol()) continue;
and at this point i would also like to know if the variable is mutable.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
i have a small question regarding the binding of variables. In this method:
from the
DeclarativeEnvironment
, the binding is returned as an out variable. The binding variable is of type Binding, and this class has a property calledMutable
.I would like to know if it is somehow possible to access the value of this property from outside of Jint, for example, from C# code that consumes the Jint library?
For example:
Currently i have something like this in my C# code:
and at this point i would also like to know if the variable is mutable.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions