Class SerializationOptions
- Namespace
- WebDriverBiDi.Script
- Assembly
- WebDriverBiDi.dll
Options for serialization of script objects.
public class SerializationOptions
- Inheritance
-
SerializationOptions
- Inherited Members
Constructors
SerializationOptions()
public SerializationOptions()
Fields
InfiniteMaxDomDepth
Gets a sentinel value indicating that there should be no limit on the maximum depth when serializing DOM nodes from script execution.
public const long InfiniteMaxDomDepth = -1
Field Value
Properties
IncludeShadowTree
Gets or sets a value indicating which shadow trees to serialize when serializing nodes from script execution.
[JsonPropertyName("includeShadowTree")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IncludeShadowTreeSerializationOption? IncludeShadowTree { get; set; }
Property Value
MaxDomDepth
Gets or sets the maximum depth when serializing DOM nodes from script execution.
[JsonPropertyName("maxDomDepth")]
[JsonConverter(typeof(SentinelNullJsonConverter<long, NegativeLongSentinelChecker>))]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[SpecRange(0, Infinity, HasSentinel = true, SentinelValue = -1)]
public long? MaxDomDepth { get; set; }
Property Value
- long?
Remarks
Valid values for this property are greater than or equal to zero (or InfiniteMaxDomDepth
for no limit). This property does not validate its value. A value of zero or greater is sent as-is; any
negative value is sent as JSON null, which the protocol reads as no limit, so a negative value
other than the sentinel asks for the same thing rather than being rejected.
Any negative value means no limit, but only InfiniteMaxDomDepth is declared as the sentinel of the SpecRangeAttribute, so tooling reports another negative value as out of range. That is deliberate, and matches how every other resettable numeric property in the library is declared: the named sentinel is the supported way to ask for no limit.
MaxObjectDepth
Gets or sets the maximum depth when serializing script objects from script execution.
[JsonPropertyName("maxObjectDepth")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ulong? MaxObjectDepth { get; set; }