Skip to content

Commit eaa5b54

Browse files
committed
feat: add FedCm to InitiatorType and add DefaultEnumValue fallback
Add FedCm enum member with [EnumMember(Value = "FedCM")] to prevent JSON deserialization failures when Chrome sends this initiator type. Also add [DefaultEnumValue((int)Other)] so any future unknown CDP initiator types gracefully fall back to Other instead of throwing. Closes #3424
1 parent a375395 commit eaa5b54

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/PuppeteerSharp/InitiatorType.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace PuppeteerSharp;
88
/// Type of the <see cref="Initiator"/>.
99
/// </summary>
1010
[JsonConverter(typeof(JsonStringEnumMemberConverter<InitiatorType>))]
11+
[DefaultEnumValue((int)Other)]
1112
public enum InitiatorType
1213
{
1314
/// <summary>
@@ -40,4 +41,10 @@ public enum InitiatorType
4041
/// Other.
4142
/// </summary>
4243
Other,
44+
45+
/// <summary>
46+
/// FedCM.
47+
/// </summary>
48+
[EnumMember(Value = "FedCM")]
49+
FedCm,
4350
}

0 commit comments

Comments
 (0)