mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 11:42:36 +00:00
Added support for property setting.
This commit is contained in:
committed by
Per Lundberg
parent
35dfcebe1a
commit
36bf863329
@@ -314,7 +314,15 @@ namespace CefSharp
|
||||
{
|
||||
// TODO: Handle read-only properties correctly here.
|
||||
auto nameStr = toNative(propertyName);
|
||||
javascriptObject->SetValue(nameStr, V8_ACCESS_CONTROL_DEFAULT, V8_PROPERTY_ATTRIBUTE_NONE);
|
||||
|
||||
cef_v8_propertyattribute_t propertyAttribute = V8_PROPERTY_ATTRIBUTE_NONE;
|
||||
|
||||
if (properties[propertyName]->GetSetMethod() == nullptr)
|
||||
{
|
||||
propertyAttribute = V8_PROPERTY_ATTRIBUTE_READONLY;
|
||||
}
|
||||
|
||||
javascriptObject->SetValue(nameStr, V8_ACCESS_CONTROL_DEFAULT, propertyAttribute);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user