RuleSet class

Corresponds to SpeculationRuleSet

Constructors

RuleSet({required RuleSetId id, required LoaderId loaderId, required String sourceText, BackendNodeId? backendNodeId, String? url, RequestId? requestId, RuleSetErrorType? errorType, String? tag})
RuleSet.fromJson(Map<String, dynamic> json)
factory

Properties

backendNodeId → 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.
final
errorType → RuleSetErrorType?
Error information errorMessage is null iff errorType is null.
final
hashCode → int
The hash code for this object.
no setterinherited
id → RuleSetId
final
loaderId → LoaderId
Identifies a document which the rule set is associated with.
final
requestId → RequestId?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceText → String
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.
final
tag → String?
For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md
final
url → String?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited