public JavaScriptValue GetProperty(JavaScriptPropertyId id) { JavaScriptValue propertyReference; Native.ThrowIfError(Native.JsGetProperty(this, id, out propertyReference)); return propertyReference; }
public bool HasVariable(string variableName) { bool result = InvokeScript(() => { JavaScriptValue globalObj = JavaScriptValue.GlobalObject; JavaScriptPropertyId variableId = JavaScriptPropertyId.FromString(variableName); bool variableExist = globalObj.HasProperty(variableId); if (variableExist) { JavaScriptValue variableValue = globalObj.GetProperty(variableId); variableExist = (variableValue.ValueType != JavaScriptValueType.Undefined); } return(variableExist); }); return(result); }