Class RuleSet
Corresponds to SpeculationRuleSet
public sealed record RuleSet : IEquatable<RuleSet>
- Inheritance
-
RuleSet
- Implements
- Inherited Members
Constructors
RuleSet(RuleSetId, LoaderId, string)
Corresponds to SpeculationRuleSet
public RuleSet(RuleSetId Id, LoaderId LoaderId, string SourceText)
Parameters
IdRuleSetIdLoaderIdLoaderIdIdentifies a document which the rule set is associated with.
SourceTextstringSource text of JSON representing the rule set. If it comes from <script> tag, it is the textContent of the node. Note that it is a JSON for valid case.
See also:
Properties
BackendNodeId
A speculation rule set is either added through an inline <script> tag or through an external resource via the 'Speculation-Rules' HTTP header. For the first case, we include the BackendNodeId of the relevant <script> tag. For the second case, we include the external URL where the rule set was loaded from, and also RequestId if Network domain is enabled.
See also:
public BackendNodeId? BackendNodeId { get; init; }
Property Value
ErrorMessage
TODO(https://crbug.com/1425354): Replace this property with structured error.
[Obsolete]
public string? ErrorMessage { get; init; }
Property Value
ErrorType
Error information errorMessage is null iff errorType is null.
public RuleSetErrorType? ErrorType { get; init; }
Property Value
Id
public RuleSetId Id { get; init; }
Property Value
LoaderId
Identifies a document which the rule set is associated with.
public LoaderId LoaderId { get; init; }
Property Value
RequestId
public RequestId? RequestId { get; init; }
Property Value
SourceText
Source text of JSON representing the rule set. If it comes from <script> tag, it is the textContent of the node. Note that it is a JSON for valid case.
See also:
public string SourceText { get; init; }
Property Value
Tag
For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md
public string? Tag { get; init; }
Property Value
Url
public string? Url { get; init; }