Class RuleSet
Corresponds to SpeculationRuleSet
public sealed class RuleSet
- Inheritance
-
RuleSet
- Inherited Members
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:
[JsonPropertyName("backendNodeId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public long? BackendNodeId { get; set; }
Property Value
- long?
ErrorMessage
TODO(https://crbug.com/1425354): Replace this property with structured error.
[JsonPropertyName("errorMessage")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? ErrorMessage { get; set; }
Property Value
ErrorType
Error information
errorMessage is null iff errorType is null.
[JsonPropertyName("errorType")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public RuleSetErrorType? ErrorType { get; set; }
Property Value
Id
id
[JsonPropertyName("id")]
public string Id { get; set; }
Property Value
LoaderId
Identifies a document which the rule set is associated with.
[JsonPropertyName("loaderId")]
public string LoaderId { get; set; }
Property Value
RequestId
requestId
[JsonPropertyName("requestId")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? RequestId { get; set; }
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:
[JsonPropertyName("sourceText")]
public string SourceText { get; set; }
Property Value
Tag
For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md
[JsonPropertyName("tag")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Tag { get; set; }
Property Value
Url
url
[JsonPropertyName("url")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
public string? Url { get; set; }