Documentation
¶
Overview ¶
Package css provides the Chrome DevTools Protocol commands, types, and events for the CSS domain.
This domain exposes CSS read/write operations. All CSS objects (stylesheets, rules, and styles) have an associated id used in subsequent operations on the related object. Each object type has a specific id structure, and those are not interchangeable between objects of different kinds. CSS objects can be loaded using the get*ForNode() calls (which accept a DOM node id). A client can also keep track of stylesheets via the styleSheetAdded/styleSheetRemoved events and subsequently load the required stylesheet contents using the getStyleSheet[Text]() methods.
Generated by the pdlgen command.
Index ¶
- Constants
- Variables
- type AddRuleParams
- type AddRuleResult
- type AnimationStyle
- type AtRule
- type AtRuleSubsection
- type AtRuleType
- type CollectClassNamesParams
- type CollectClassNamesResult
- type ComputedStyleExtraFields
- type ComputedStyleProperty
- type ContainerQuery
- type CreateStyleSheetParams
- type CreateStyleSheetResult
- type EventComputedStyleUpdated
- type EventFontsUpdated
- type EventMediaQueryResultChanged
- type EventStyleSheetAdded
- type EventStyleSheetChanged
- type EventStyleSheetRemoved
- type FontFace
- type FontVariationAxis
- type ForcePositionTryOptionParams
- type ForcePseudoStateParams
- type ForceStartingStyleParams
- type FunctionConditionNode
- type FunctionNode
- type FunctionParameter
- type FunctionRule
- type GetAnimatedStylesForNodeParams
- type GetAnimatedStylesForNodeResult
- type GetBackgroundColorsParams
- type GetBackgroundColorsResult
- type GetComputedStyleForNodeParams
- type GetComputedStyleForNodeResult
- type GetEnvironmentVariablesResult
- type GetInlineStylesForNodeParams
- type GetInlineStylesForNodeResult
- type GetLayersForNodeParams
- type GetLayersForNodeResult
- type GetLocationForSelectorParams
- type GetLocationForSelectorResult
- type GetLonghandPropertiesParams
- type GetLonghandPropertiesResult
- type GetMatchedStylesForNodeParams
- type GetMatchedStylesForNodeResult
- type GetMediaQueriesResult
- type GetPlatformFontsForNodeParams
- type GetPlatformFontsForNodeResult
- type GetStyleSheetTextParams
- type GetStyleSheetTextResult
- type InheritedAnimatedStyleEntry
- type InheritedPseudoElementMatches
- type InheritedStyleEntry
- type KeyframeRule
- type KeyframesRule
- type Layer
- type LayerData
- type Media
- type MediaQuery
- type MediaQueryExpression
- type MediaSource
- type Navigation
- type PlatformFontUsage
- type PositionTryRule
- type Property
- type PropertyRegistration
- type PropertyRule
- type PseudoElementMatches
- type ResolveValuesParams
- type ResolveValuesResult
- type Rule
- type RuleMatch
- type RuleType
- type RuleUsage
- type Scope
- type SelectorList
- type SetContainerQueryConditionTextParams
- type SetContainerQueryConditionTextResult
- type SetEffectivePropertyValueForNodeParams
- type SetKeyframeKeyParams
- type SetKeyframeKeyResult
- type SetLocalFontsEnabledParams
- type SetMediaTextParams
- type SetMediaTextResult
- type SetNavigationTextParams
- type SetNavigationTextResult
- type SetPropertyRulePropertyNameParams
- type SetPropertyRulePropertyNameResult
- type SetRuleSelectorParams
- type SetRuleSelectorResult
- type SetScopeTextParams
- type SetScopeTextResult
- type SetStyleSheetTextParams
- type SetStyleSheetTextResult
- type SetStyleTextsParams
- type SetStyleTextsResult
- type SetSupportsTextParams
- type SetSupportsTextResult
- type ShorthandEntry
- type SourceRange
- type Specificity
- type SpecificityComponent
- type StartingStyle
- type StopRuleUsageTrackingResult
- type Style
- type StyleDeclarationEdit
- type StyleSheetHeader
- type StyleSheetOrigin
- type Supports
- type TakeComputedStyleUpdatesResult
- type TakeCoverageDeltaResult
- type TrackComputedStyleUpdatesForNodeParams
- type TrackComputedStyleUpdatesParams
- type TryRule
- type Value
Constants ¶
const ( CommandAddRule = "CSS.addRule" CommandCollectClassNames = "CSS.collectClassNames" CommandCreateStyleSheet = "CSS.createStyleSheet" CommandDisable = "CSS.disable" CommandEnable = "CSS.enable" CommandForcePseudoState = "CSS.forcePseudoState" CommandForceStartingStyle = "CSS.forceStartingStyle" CommandForcePositionTryOption = "CSS.forcePositionTryOption" CommandGetBackgroundColors = "CSS.getBackgroundColors" CommandGetComputedStyleForNode = "CSS.getComputedStyleForNode" CommandResolveValues = "CSS.resolveValues" CommandGetLonghandProperties = "CSS.getLonghandProperties" CommandGetInlineStylesForNode = "CSS.getInlineStylesForNode" CommandGetAnimatedStylesForNode = "CSS.getAnimatedStylesForNode" CommandGetMatchedStylesForNode = "CSS.getMatchedStylesForNode" CommandGetEnvironmentVariables = "CSS.getEnvironmentVariables" CommandGetMediaQueries = "CSS.getMediaQueries" CommandGetPlatformFontsForNode = "CSS.getPlatformFontsForNode" CommandGetStyleSheetText = "CSS.getStyleSheetText" CommandGetLayersForNode = "CSS.getLayersForNode" CommandGetLocationForSelector = "CSS.getLocationForSelector" CommandTrackComputedStyleUpdatesForNode = "CSS.trackComputedStyleUpdatesForNode" CommandTrackComputedStyleUpdates = "CSS.trackComputedStyleUpdates" CommandTakeComputedStyleUpdates = "CSS.takeComputedStyleUpdates" CommandSetEffectivePropertyValueForNode = "CSS.setEffectivePropertyValueForNode" CommandSetPropertyRulePropertyName = "CSS.setPropertyRulePropertyName" CommandSetKeyframeKey = "CSS.setKeyframeKey" CommandSetMediaText = "CSS.setMediaText" CommandSetContainerQueryConditionText = "CSS.setContainerQueryConditionText" CommandSetSupportsText = "CSS.setSupportsText" CommandSetScopeText = "CSS.setScopeText" CommandSetRuleSelector = "CSS.setRuleSelector" CommandSetStyleSheetText = "CSS.setStyleSheetText" CommandSetStyleTexts = "CSS.setStyleTexts" CommandStartRuleUsageTracking = "CSS.startRuleUsageTracking" CommandStopRuleUsageTracking = "CSS.stopRuleUsageTracking" CommandTakeCoverageDelta = "CSS.takeCoverageDelta" CommandSetLocalFontsEnabled = "CSS.setLocalFontsEnabled" )
Command names.
Variables ¶
var AddRule = cdp.Command[AddRuleParams, AddRuleResult]{Method: CommandAddRule}
AddRule inserts a new rule with the given ruleText in a stylesheet with given styleSheetId, at the position specified by location.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-addRule
var CollectClassNames = cdp.Command[CollectClassNamesParams, CollectClassNamesResult]{Method: CommandCollectClassNames}
CollectClassNames returns all class names from specified stylesheet.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-collectClassNames
var ComputedStyleUpdated = cdp.Event[EventComputedStyleUpdated]{Method: "CSS.computedStyleUpdated"}
ComputedStyleUpdated [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-computedStyleUpdated
var CreateStyleSheet = cdp.Command[CreateStyleSheetParams, CreateStyleSheetResult]{Method: CommandCreateStyleSheet}
CreateStyleSheet creates a new special "via-inspector" stylesheet in the frame with given frameId.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-createStyleSheet
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}
Disable disables the CSS agent for the given page.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-disable
var Enable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandEnable}
Enable enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-enable
var FontsUpdated = cdp.Event[EventFontsUpdated]{Method: "CSS.fontsUpdated"}
FontsUpdated fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-fontsUpdated
var ForcePositionTryOption = cdp.Command[ForcePositionTryOptionParams, cdp.Empty]{Method: CommandForcePositionTryOption}
ForcePositionTryOption forces a position-try option for the given node.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-forcePositionTryOption
var ForcePseudoState = cdp.Command[ForcePseudoStateParams, cdp.Empty]{Method: CommandForcePseudoState}
ForcePseudoState ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-forcePseudoState
var ForceStartingStyle = cdp.Command[ForceStartingStyleParams, cdp.Empty]{Method: CommandForceStartingStyle}
ForceStartingStyle ensures that the given node is in its starting-style state.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-forceStartingStyle
var GetAnimatedStylesForNode = cdp.Command[GetAnimatedStylesForNodeParams, GetAnimatedStylesForNodeResult]{Method: CommandGetAnimatedStylesForNode}
GetAnimatedStylesForNode returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getAnimatedStylesForNode
var GetBackgroundColors = cdp.Command[GetBackgroundColorsParams, GetBackgroundColorsResult]{Method: CommandGetBackgroundColors}
GetBackgroundColors [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getBackgroundColors
var GetComputedStyleForNode = cdp.Command[GetComputedStyleForNodeParams, GetComputedStyleForNodeResult]{Method: CommandGetComputedStyleForNode}
GetComputedStyleForNode returns the computed style for a DOM node identified by nodeId.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getComputedStyleForNode
var GetEnvironmentVariables = cdp.Command[cdp.Empty, GetEnvironmentVariablesResult]{Method: CommandGetEnvironmentVariables}
GetEnvironmentVariables returns the values of the default UA-defined environment variables used in env().
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getEnvironmentVariables
var GetInlineStylesForNode = cdp.Command[GetInlineStylesForNodeParams, GetInlineStylesForNodeResult]{Method: CommandGetInlineStylesForNode}
GetInlineStylesForNode returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by nodeId.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getInlineStylesForNode
var GetLayersForNode = cdp.Command[GetLayersForNodeParams, GetLayersForNodeResult]{Method: CommandGetLayersForNode}
GetLayersForNode returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getLayersForNode
var GetLocationForSelector = cdp.Command[GetLocationForSelectorParams, GetLocationForSelectorResult]{Method: CommandGetLocationForSelector}
GetLocationForSelector given a CSS selector text and a style sheet ID, getLocationForSelector returns an array of locations of the CSS selector in the style sheet.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getLocationForSelector
var GetLonghandProperties = cdp.Command[GetLonghandPropertiesParams, GetLonghandPropertiesResult]{Method: CommandGetLonghandProperties}
GetLonghandProperties [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getLonghandProperties
var GetMatchedStylesForNode = cdp.Command[GetMatchedStylesForNodeParams, GetMatchedStylesForNodeResult]{Method: CommandGetMatchedStylesForNode}
GetMatchedStylesForNode returns requested styles for a DOM node identified by nodeId.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getMatchedStylesForNode
var GetMediaQueries = cdp.Command[cdp.Empty, GetMediaQueriesResult]{Method: CommandGetMediaQueries}
GetMediaQueries returns all media queries parsed by the rendering engine.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getMediaQueries
var GetPlatformFontsForNode = cdp.Command[GetPlatformFontsForNodeParams, GetPlatformFontsForNodeResult]{Method: CommandGetPlatformFontsForNode}
GetPlatformFontsForNode requests information about platform fonts which we used to render child TextNodes in the given node.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getPlatformFontsForNode
var GetStyleSheetText = cdp.Command[GetStyleSheetTextParams, GetStyleSheetTextResult]{Method: CommandGetStyleSheetText}
GetStyleSheetText returns the current textual content for a stylesheet.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getStyleSheetText
var MediaQueryResultChanged = cdp.Event[EventMediaQueryResultChanged]{Method: "CSS.mediaQueryResultChanged"}
MediaQueryResultChanged fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-mediaQueryResultChanged
var ResolveValues = cdp.Command[ResolveValuesParams, ResolveValuesResult]{Method: CommandResolveValues}
ResolveValues resolve the specified values in the context of the provided element. For example, a value of '1em' is evaluated according to the computed 'font-size' of the element and a value 'calc(1px + 2px)' will be resolved to '3px'. If the propertyName was specified the values are resolved as if they were property's declaration. If a value cannot be parsed according to the provided property syntax, the value is parsed using combined syntax as if null propertyName was provided. If the value cannot be resolved even then, return the provided value without any changes. Note: this function currently does not resolve CSS random() function, it returns unmodified random() function parts.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-resolveValues
var SetContainerQueryConditionText = cdp.Command[SetContainerQueryConditionTextParams, SetContainerQueryConditionTextResult]{Method: CommandSetContainerQueryConditionText}
SetContainerQueryConditionText [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setContainerQueryConditionText
var SetEffectivePropertyValueForNode = cdp.Command[SetEffectivePropertyValueForNodeParams, cdp.Empty]{Method: CommandSetEffectivePropertyValueForNode}
SetEffectivePropertyValueForNode find a rule with the given active property for the given node and set the new value for this property.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setEffectivePropertyValueForNode
var SetKeyframeKey = cdp.Command[SetKeyframeKeyParams, SetKeyframeKeyResult]{Method: CommandSetKeyframeKey}
SetKeyframeKey modifies the keyframe rule key text.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setKeyframeKey
var SetLocalFontsEnabled = cdp.Command[SetLocalFontsEnabledParams, cdp.Empty]{Method: CommandSetLocalFontsEnabled}
SetLocalFontsEnabled enables/disables rendering of local CSS fonts (enabled by default).
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setLocalFontsEnabled
var SetMediaText = cdp.Command[SetMediaTextParams, SetMediaTextResult]{Method: CommandSetMediaText}
SetMediaText modifies the rule selector.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setMediaText
SetNavigationText modifies the expression of a navigation at-rule.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setNavigationText
var SetPropertyRulePropertyName = cdp.Command[SetPropertyRulePropertyNameParams, SetPropertyRulePropertyNameResult]{Method: CommandSetPropertyRulePropertyName}
SetPropertyRulePropertyName modifies the property rule property name.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setPropertyRulePropertyName
var SetRuleSelector = cdp.Command[SetRuleSelectorParams, SetRuleSelectorResult]{Method: CommandSetRuleSelector}
SetRuleSelector modifies the rule selector.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setRuleSelector
var SetScopeText = cdp.Command[SetScopeTextParams, SetScopeTextResult]{Method: CommandSetScopeText}
SetScopeText modifies the expression of a scope at-rule.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setScopeText
var SetStyleSheetText = cdp.Command[SetStyleSheetTextParams, SetStyleSheetTextResult]{Method: CommandSetStyleSheetText}
SetStyleSheetText sets the new stylesheet text.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setStyleSheetText
var SetStyleTexts = cdp.Command[SetStyleTextsParams, SetStyleTextsResult]{Method: CommandSetStyleTexts}
SetStyleTexts applies specified style edits one after another in the given order.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setStyleTexts
var SetSupportsText = cdp.Command[SetSupportsTextParams, SetSupportsTextResult]{Method: CommandSetSupportsText}
SetSupportsText modifies the expression of a supports at-rule.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setSupportsText
var StartRuleUsageTracking = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandStartRuleUsageTracking}
StartRuleUsageTracking enables the selector recording.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-startRuleUsageTracking
var StopRuleUsageTracking = cdp.Command[cdp.Empty, StopRuleUsageTrackingResult]{Method: CommandStopRuleUsageTracking}
StopRuleUsageTracking stop tracking rule usage and return the list of rules that were used since last call to takeCoverageDelta (or since start of coverage instrumentation).
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-stopRuleUsageTracking
var StyleSheetAdded = cdp.Event[EventStyleSheetAdded]{Method: "CSS.styleSheetAdded"}
StyleSheetAdded fired whenever an active document stylesheet is added.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-styleSheetAdded
var StyleSheetChanged = cdp.Event[EventStyleSheetChanged]{Method: "CSS.styleSheetChanged"}
StyleSheetChanged fired whenever a stylesheet is changed as a result of the client operation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-styleSheetChanged
var StyleSheetRemoved = cdp.Event[EventStyleSheetRemoved]{Method: "CSS.styleSheetRemoved"}
StyleSheetRemoved fired whenever an active document stylesheet is removed.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-styleSheetRemoved
var TakeComputedStyleUpdates = cdp.Command[cdp.Empty, TakeComputedStyleUpdatesResult]{Method: CommandTakeComputedStyleUpdates}
TakeComputedStyleUpdates polls the next batch of computed style updates.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-takeComputedStyleUpdates
var TakeCoverageDelta = cdp.Command[cdp.Empty, TakeCoverageDeltaResult]{Method: CommandTakeCoverageDelta}
TakeCoverageDelta obtain list of rules that became used since last call to this method (or since start of coverage instrumentation).
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-takeCoverageDelta
var TrackComputedStyleUpdates = cdp.Command[TrackComputedStyleUpdatesParams, cdp.Empty]{Method: CommandTrackComputedStyleUpdates}
TrackComputedStyleUpdates starts tracking the given computed styles for updates. The specified array of properties replaces the one previously specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. The changes to computed style properties are only tracked for nodes pushed to the front-end by the DOM agent. If no changes to the tracked properties occur after the node has been pushed to the front-end, no updates will be issued for the node.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-trackComputedStyleUpdates
var TrackComputedStyleUpdatesForNode = cdp.Command[TrackComputedStyleUpdatesForNodeParams, cdp.Empty]{Method: CommandTrackComputedStyleUpdatesForNode}
TrackComputedStyleUpdatesForNode starts tracking the given node for the computed style updates and whenever the computed style is updated for node, it queues a computedStyleUpdated event with throttling. There can only be 1 node tracked for computed style updates so passing a new node id removes tracking from the previous node. Pass undefined to disable tracking.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-trackComputedStyleUpdatesForNode
Functions ¶
This section is empty.
Types ¶
type AddRuleParams ¶
type AddRuleParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"` // The css style sheet identifier where a new rule should be inserted.
RuleText string `json:"ruleText"` // The text of a new rule.
Location *SourceRange `json:"location"` // Text position of a new rule in the target style sheet.
NodeForPropertySyntaxValidation cdp.NodeID `json:"nodeForPropertySyntaxValidation,omitempty,omitzero"` // NodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.
}
AddRuleParams are the parameters of the command CSS.addRule.
type AddRuleResult ¶ added in v0.157.3
type AddRuleResult struct {
Rule *Rule `json:"rule,omitempty,omitzero"` // The newly created rule.
}
AddRuleResult is the result of the command CSS.addRule.
type AnimationStyle ¶
type AnimationStyle struct {
Name string `json:"name,omitempty,omitzero"` // The name of the animation.
Style *Style `json:"style"` // The style coming from the animation.
}
AnimationStyle CSS style coming from animations with the name of the animation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSAnimationStyle
type AtRule ¶
type AtRule struct {
Type AtRuleType `json:"type"` // Type of at-rule.
Subsection AtRuleSubsection `json:"subsection,omitempty,omitzero"` // Subsection of font-feature-values, if this is a subsection.
Name *Value `json:"name,omitempty,omitzero"` // LINT.ThenChange(//third_party/blink/renderer/core/inspector/inspector_style_sheet.cc:FontVariantAlternatesFeatureType,//third_party/blink/renderer/core/inspector/inspector_css_agent.cc:FontVariantAlternatesFeatureType) Associated name, if applicable.
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
Style *Style `json:"style"` // Associated style declaration.
}
AtRule CSS generic @rule representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSAtRule
type AtRuleSubsection ¶ added in v0.157.1
type AtRuleSubsection string
AtRuleSubsection subsection of font-feature-values, if this is a subsection.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSAtRule
const ( AtRuleSubsectionSwash AtRuleSubsection = "swash" AtRuleSubsectionAnnotation AtRuleSubsection = "annotation" AtRuleSubsectionOrnaments AtRuleSubsection = "ornaments" AtRuleSubsectionStylistic AtRuleSubsection = "stylistic" AtRuleSubsectionStyleset AtRuleSubsection = "styleset" AtRuleSubsectionCharacterVariant AtRuleSubsection = "character-variant" )
AtRuleSubsection values.
func (AtRuleSubsection) String ¶ added in v0.157.1
func (t AtRuleSubsection) String() string
String returns the AtRuleSubsection as string value.
type AtRuleType ¶ added in v0.157.1
type AtRuleType string
AtRuleType type of at-rule.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSAtRule
const ( AtRuleTypeFontFace AtRuleType = "font-face" AtRuleTypeFontFeatureValues AtRuleType = "font-feature-values" AtRuleTypeFontPaletteValues AtRuleType = "font-palette-values" AtRuleTypeCounterStyle AtRuleType = "counter-style" )
AtRuleType values.
func (AtRuleType) String ¶ added in v0.157.1
func (t AtRuleType) String() string
String returns the AtRuleType as string value.
type CollectClassNamesParams ¶
type CollectClassNamesParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
}
CollectClassNamesParams are the parameters of the command CSS.collectClassNames.
type CollectClassNamesResult ¶ added in v0.157.3
type CollectClassNamesResult struct {
ClassNames []string `json:"classNames,omitempty,omitzero"` // Class name list.
}
CollectClassNamesResult is the result of the command CSS.collectClassNames.
type ComputedStyleExtraFields ¶
type ComputedStyleExtraFields struct {
IsAppearanceBase bool `json:"isAppearanceBase"` // Returns whether or not this node is being rendered with base appearance, which happens when it has its appearance property set to base/base-select or it is in the subtree of an element being rendered with base appearance.
}
ComputedStyleExtraFields [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-ComputedStyleExtraFields
type ComputedStyleProperty ¶
type ComputedStyleProperty struct {
Name string `json:"name"` // Computed style property name.
Value string `json:"value"` // Computed style property value.
}
ComputedStyleProperty [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSComputedStyleProperty
type ContainerQuery ¶
type ContainerQuery struct {
Range *SourceRange `json:"range,omitempty,omitzero"` // The associated rule header range in the enclosing stylesheet (if available).
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // Identifier of the stylesheet containing this object (if exists).
Name string `json:"name,omitempty,omitzero"` // Optional name for the container.
PhysicalAxes dom.PhysicalAxes `json:"physicalAxes,omitempty,omitzero"` // Optional physical axes queried for the container.
LogicalAxes dom.LogicalAxes `json:"logicalAxes,omitempty,omitzero"` // Optional logical axes queried for the container.
QueriesScrollState bool `json:"queriesScrollState"` // true if the query contains scroll-state() queries.
QueriesAnchored bool `json:"queriesAnchored"` // true if the query contains anchored() queries.
ConditionText string `json:"conditionText"` // CSSContainerRule.conditionText
}
ContainerQuery CSS container query rule descriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSContainerQuery
type CreateStyleSheetParams ¶
type CreateStyleSheetParams struct {
FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame where "via-inspector" stylesheet should be created.
Force *bool `json:"force,omitempty,omitzero"` // If true, creates a new stylesheet for every call. If false, returns a stylesheet previously created by a call with force=false for the frame's document if it exists or creates a new stylesheet (default: false).
}
CreateStyleSheetParams are the parameters of the command CSS.createStyleSheet.
type CreateStyleSheetResult ¶ added in v0.157.3
type CreateStyleSheetResult struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // Identifier of the created "via-inspector" stylesheet.
}
CreateStyleSheetResult is the result of the command CSS.createStyleSheet.
type EventComputedStyleUpdated ¶
type EventComputedStyleUpdated struct {
NodeID cdp.NodeID `json:"nodeId"` // The node id that has updated computed styles.
}
EventComputedStyleUpdated [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-computedStyleUpdated
type EventFontsUpdated ¶
type EventFontsUpdated struct {
Font *FontFace `json:"font,omitempty,omitzero"` // The web font that has loaded.
}
EventFontsUpdated fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-fontsUpdated
type EventMediaQueryResultChanged ¶
type EventMediaQueryResultChanged struct{}
EventMediaQueryResultChanged fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-mediaQueryResultChanged
type EventStyleSheetAdded ¶
type EventStyleSheetAdded struct {
Header *StyleSheetHeader `json:"header"` // Added stylesheet metainfo.
}
EventStyleSheetAdded fired whenever an active document stylesheet is added.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-styleSheetAdded
type EventStyleSheetChanged ¶
type EventStyleSheetChanged struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
}
EventStyleSheetChanged fired whenever a stylesheet is changed as a result of the client operation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-styleSheetChanged
type EventStyleSheetRemoved ¶
type EventStyleSheetRemoved struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"` // Identifier of the removed stylesheet.
}
EventStyleSheetRemoved fired whenever an active document stylesheet is removed.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#event-styleSheetRemoved
type FontFace ¶
type FontFace struct {
FontFamily string `json:"fontFamily"` // The font-family.
FontStyle string `json:"fontStyle"` // The font-style.
FontVariant string `json:"fontVariant"` // The font-variant.
FontWeight string `json:"fontWeight"` // The font-weight.
FontStretch string `json:"fontStretch"` // The font-stretch.
FontDisplay string `json:"fontDisplay"` // The font-display.
UnicodeRange string `json:"unicodeRange"` // The unicode-range.
Src string `json:"src"` // The src.
PlatformFontFamily string `json:"platformFontFamily"` // The resolved platform font family
FontVariationAxes []*FontVariationAxis `json:"fontVariationAxes,omitempty,omitzero"` // Available variation settings (a.k.a. "axes").
}
FontFace properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions and additional information such as platformFontFamily and fontVariationAxes.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-FontFace
type FontVariationAxis ¶
type FontVariationAxis struct {
Tag string `json:"tag"` // The font-variation-setting tag (a.k.a. "axis tag").
Name string `json:"name"` // Human-readable variation name in the default language (normally, "en").
MinValue float64 `json:"minValue"` // The minimum value (inclusive) the font supports for this tag.
MaxValue float64 `json:"maxValue"` // The maximum value (inclusive) the font supports for this tag.
DefaultValue float64 `json:"defaultValue"` // The default value.
}
FontVariationAxis information about font variation axes for variable fonts.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-FontVariationAxis
type ForcePositionTryOptionParams ¶
type ForcePositionTryOptionParams struct {
NodeID cdp.NodeID `json:"nodeId"` // The element id for which to force the position-try option.
Index *int64 `json:"index,omitempty,omitzero"` // The 1-based index of the position-try fallback option, 0 for base position (no fallback), or omitted to clear the forced state.
}
ForcePositionTryOptionParams are the parameters of the command CSS.forcePositionTryOption.
type ForcePseudoStateParams ¶
type ForcePseudoStateParams struct {
NodeID cdp.NodeID `json:"nodeId"` // The element id for which to force the pseudo state.
ForcedPseudoClasses []string `json:"forcedPseudoClasses"` // Element pseudo classes to force when computing the element's style.
}
ForcePseudoStateParams are the parameters of the command CSS.forcePseudoState.
type ForceStartingStyleParams ¶
type ForceStartingStyleParams struct {
NodeID cdp.NodeID `json:"nodeId"` // The element id for which to force the starting-style state.
Forced bool `json:"forced"` // Boolean indicating if this is on or off.
}
ForceStartingStyleParams are the parameters of the command CSS.forceStartingStyle.
type FunctionConditionNode ¶
type FunctionConditionNode struct {
Media *Media `json:"media,omitempty,omitzero"` // Media query for this conditional block. Only one type of condition should be set.
ContainerQueries *ContainerQuery `json:"containerQueries,omitempty,omitzero"` // Container query for this conditional block. Only one type of condition should be set.
Supports *Supports `json:"supports,omitempty,omitzero"` // @supports CSS at-rule condition. Only one type of condition should be set.
Children []*FunctionNode `json:"children"` // Block body.
ConditionText string `json:"conditionText"` // The condition text.
}
FunctionConditionNode CSS function conditional block representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSFunctionConditionNode
type FunctionNode ¶
type FunctionNode struct {
Condition *FunctionConditionNode `json:"condition,omitempty,omitzero"` // A conditional block. If set, style should not be set.
Style *Style `json:"style,omitempty,omitzero"` // Values set by this node. If set, condition should not be set.
}
FunctionNode section of the body of a CSS function rule.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSFunctionNode
type FunctionParameter ¶
type FunctionParameter struct {
Name string `json:"name"` // The parameter name.
Type string `json:"type"` // The parameter type.
}
FunctionParameter CSS function argument representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSFunctionParameter
type FunctionRule ¶
type FunctionRule struct {
Name *Value `json:"name"` // Name of the function.
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
Parameters []*FunctionParameter `json:"parameters"` // List of parameters.
Children []*FunctionNode `json:"children"` // Function body.
OriginTreeScopeNodeID cdp.BackendNodeID `json:"originTreeScopeNodeId,omitempty,omitzero"` // The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.
}
FunctionRule CSS function at-rule representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSFunctionRule
type GetAnimatedStylesForNodeParams ¶
GetAnimatedStylesForNodeParams are the parameters of the command CSS.getAnimatedStylesForNode.
type GetAnimatedStylesForNodeResult ¶ added in v0.157.3
type GetAnimatedStylesForNodeResult struct {
AnimationStyles []*AnimationStyle `json:"animationStyles,omitempty,omitzero"` // Styles coming from animations.
TransitionsStyle *Style `json:"transitionsStyle,omitempty,omitzero"` // Style coming from transitions.
Inherited []*InheritedAnimatedStyleEntry `json:"inherited,omitempty,omitzero"` // Inherited style entries for animationsStyle and transitionsStyle from the inheritance chain of the element.
}
GetAnimatedStylesForNodeResult is the result of the command CSS.getAnimatedStylesForNode.
type GetBackgroundColorsParams ¶
type GetBackgroundColorsParams struct {
NodeID cdp.NodeID `json:"nodeId"` // Id of the node to get background colors for.
}
GetBackgroundColorsParams are the parameters of the command CSS.getBackgroundColors.
type GetBackgroundColorsResult ¶ added in v0.157.3
type GetBackgroundColorsResult struct {
BackgroundColors []string `json:"backgroundColors,omitempty,omitzero"` // The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load).
ComputedFontSize string `json:"computedFontSize,omitempty,omitzero"` // The computed font size for this node, as a CSS computed value string (e.g. '12px').
ComputedFontWeight string `json:"computedFontWeight,omitempty,omitzero"` // The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').
}
GetBackgroundColorsResult is the result of the command CSS.getBackgroundColors.
type GetComputedStyleForNodeParams ¶
GetComputedStyleForNodeParams are the parameters of the command CSS.getComputedStyleForNode.
type GetComputedStyleForNodeResult ¶ added in v0.157.3
type GetComputedStyleForNodeResult struct {
ComputedStyle []*ComputedStyleProperty `json:"computedStyle,omitempty,omitzero"` // Computed style for the specified DOM node.
ExtraFields *ComputedStyleExtraFields `json:"extraFields,omitempty,omitzero"` // A list of non-standard "extra fields" which blink stores alongside each computed style.
}
GetComputedStyleForNodeResult is the result of the command CSS.getComputedStyleForNode.
type GetEnvironmentVariablesResult ¶ added in v0.157.3
type GetEnvironmentVariablesResult struct {
EnvironmentVariables jsontext.Value `json:"environmentVariables,omitempty,omitzero"`
}
GetEnvironmentVariablesResult is the result of the command CSS.getEnvironmentVariables.
type GetInlineStylesForNodeParams ¶
GetInlineStylesForNodeParams are the parameters of the command CSS.getInlineStylesForNode.
type GetInlineStylesForNodeResult ¶ added in v0.157.3
type GetInlineStylesForNodeResult struct {
InlineStyle *Style `json:"inlineStyle,omitempty,omitzero"` // Inline style for the specified DOM node.
AttributesStyle *Style `json:"attributesStyle,omitempty,omitzero"` // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
}
GetInlineStylesForNodeResult is the result of the command CSS.getInlineStylesForNode.
type GetLayersForNodeParams ¶
GetLayersForNodeParams are the parameters of the command CSS.getLayersForNode.
type GetLayersForNodeResult ¶ added in v0.157.3
type GetLayersForNodeResult struct {
RootLayer *LayerData `json:"rootLayer,omitempty,omitzero"`
}
GetLayersForNodeResult is the result of the command CSS.getLayersForNode.
type GetLocationForSelectorParams ¶
type GetLocationForSelectorParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
SelectorText string `json:"selectorText"`
}
GetLocationForSelectorParams are the parameters of the command CSS.getLocationForSelector.
type GetLocationForSelectorResult ¶ added in v0.157.3
type GetLocationForSelectorResult struct {
Ranges []*SourceRange `json:"ranges,omitempty,omitzero"`
}
GetLocationForSelectorResult is the result of the command CSS.getLocationForSelector.
type GetLonghandPropertiesParams ¶
type GetLonghandPropertiesParams struct {
ShorthandName string `json:"shorthandName"`
Value string `json:"value"`
}
GetLonghandPropertiesParams are the parameters of the command CSS.getLonghandProperties.
type GetLonghandPropertiesResult ¶ added in v0.157.3
type GetLonghandPropertiesResult struct {
LonghandProperties []*Property `json:"longhandProperties,omitempty,omitzero"`
}
GetLonghandPropertiesResult is the result of the command CSS.getLonghandProperties.
type GetMatchedStylesForNodeParams ¶
GetMatchedStylesForNodeParams are the parameters of the command CSS.getMatchedStylesForNode.
type GetMatchedStylesForNodeResult ¶ added in v0.157.3
type GetMatchedStylesForNodeResult struct {
InlineStyle *Style `json:"inlineStyle,omitempty,omitzero"` // Inline style for the specified DOM node.
AttributesStyle *Style `json:"attributesStyle,omitempty,omitzero"` // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
MatchedCSSRules []*RuleMatch `json:"matchedCSSRules,omitempty,omitzero"` // CSS rules matching this node, from all applicable stylesheets.
PseudoElements []*PseudoElementMatches `json:"pseudoElements,omitempty,omitzero"` // Pseudo style matches for this node.
Inherited []*InheritedStyleEntry `json:"inherited,omitempty,omitzero"` // A chain of inherited styles (from the immediate node parent up to the DOM tree root).
InheritedPseudoElements []*InheritedPseudoElementMatches `json:"inheritedPseudoElements,omitempty,omitzero"` // A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
CSSKeyframesRules []*KeyframesRule `json:"cssKeyframesRules,omitempty,omitzero"` // A list of CSS keyframed animations matching this node.
CSSPositionTryRules []*PositionTryRule `json:"cssPositionTryRules,omitempty,omitzero"` // A list of CSS @position-try rules matching this node, based on the position-try-fallbacks property.
ActivePositionFallbackIndex int64 `json:"activePositionFallbackIndex,omitempty,omitzero"` // Index of the active fallback in the applied position-try-fallback property, will not be set if there is no active position-try fallback.
CSSPropertyRules []*PropertyRule `json:"cssPropertyRules,omitempty,omitzero"` // A list of CSS at-property rules matching this node.
CSSPropertyRegistrations []*PropertyRegistration `json:"cssPropertyRegistrations,omitempty,omitzero"` // A list of CSS property registrations matching this node.
CSSAtRules []*AtRule `json:"cssAtRules,omitempty,omitzero"` // A list of simple @rules matching this node or its pseudo-elements.
ParentLayoutNodeID cdp.NodeID `json:"parentLayoutNodeId,omitempty,omitzero"` // Id of the first parent element that does not have display: contents.
CSSFunctionRules []*FunctionRule `json:"cssFunctionRules,omitempty,omitzero"` // A list of CSS at-function rules referenced by styles of this node.
}
GetMatchedStylesForNodeResult is the result of the command CSS.getMatchedStylesForNode.
type GetMediaQueriesResult ¶ added in v0.157.3
type GetMediaQueriesResult struct {
Medias []*Media `json:"medias,omitempty,omitzero"`
}
GetMediaQueriesResult is the result of the command CSS.getMediaQueries.
type GetPlatformFontsForNodeParams ¶
GetPlatformFontsForNodeParams are the parameters of the command CSS.getPlatformFontsForNode.
type GetPlatformFontsForNodeResult ¶ added in v0.157.3
type GetPlatformFontsForNodeResult struct {
Fonts []*PlatformFontUsage `json:"fonts,omitempty,omitzero"` // Usage statistics for every employed platform font.
}
GetPlatformFontsForNodeResult is the result of the command CSS.getPlatformFontsForNode.
type GetStyleSheetTextParams ¶
type GetStyleSheetTextParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
}
GetStyleSheetTextParams are the parameters of the command CSS.getStyleSheetText.
type GetStyleSheetTextResult ¶ added in v0.157.3
type GetStyleSheetTextResult struct {
Text string `json:"text,omitempty,omitzero"` // The stylesheet text.
}
GetStyleSheetTextResult is the result of the command CSS.getStyleSheetText.
type InheritedAnimatedStyleEntry ¶
type InheritedAnimatedStyleEntry struct {
AnimationStyles []*AnimationStyle `json:"animationStyles,omitempty,omitzero"` // Styles coming from the animations of the ancestor, if any, in the style inheritance chain.
TransitionsStyle *Style `json:"transitionsStyle,omitempty,omitzero"` // The style coming from the transitions of the ancestor, if any, in the style inheritance chain.
}
InheritedAnimatedStyleEntry inherited CSS style collection for animated styles from ancestor node.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-InheritedAnimatedStyleEntry
type InheritedPseudoElementMatches ¶
type InheritedPseudoElementMatches struct {
PseudoElements []*PseudoElementMatches `json:"pseudoElements"` // Matches of pseudo styles from the pseudos of an ancestor node.
}
InheritedPseudoElementMatches inherited pseudo element matches from pseudos of an ancestor node.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-InheritedPseudoElementMatches
type InheritedStyleEntry ¶
type InheritedStyleEntry struct {
InlineStyle *Style `json:"inlineStyle,omitempty,omitzero"` // The ancestor node's inline style, if any, in the style inheritance chain.
MatchedCSSRules []*RuleMatch `json:"matchedCSSRules"` // Matches of CSS rules matching the ancestor node in the style inheritance chain.
}
InheritedStyleEntry inherited CSS rule collection from ancestor node.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-InheritedStyleEntry
type KeyframeRule ¶
type KeyframeRule struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
KeyText *Value `json:"keyText"` // Associated key text.
Style *Style `json:"style"` // Associated style declaration.
}
KeyframeRule CSS keyframe rule representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSKeyframeRule
type KeyframesRule ¶
type KeyframesRule struct {
AnimationName *Value `json:"animationName"` // Animation name.
Keyframes []*KeyframeRule `json:"keyframes"` // List of keyframes.
}
KeyframesRule CSS keyframes rule representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSKeyframesRule
type Layer ¶
type Layer struct {
Text string `json:"text"` // Layer name.
Range *SourceRange `json:"range,omitempty,omitzero"` // The associated rule header range in the enclosing stylesheet (if available).
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // Identifier of the stylesheet containing this object (if exists).
}
Layer CSS Layer at-rule descriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSLayer
type LayerData ¶
type LayerData struct {
Name string `json:"name"` // Layer name.
SubLayers []*LayerData `json:"subLayers,omitempty,omitzero"` // Direct sub-layers
Order float64 `json:"order"` // Layer order. The order determines the order of the layer in the cascade order. A higher number has higher priority in the cascade order.
}
LayerData CSS Layer data.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSLayerData
type Media ¶
type Media struct {
Text string `json:"text"` // Media query text.
Source MediaSource `json:"source"` // Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
SourceURL string `json:"sourceURL,omitempty,omitzero"` // URL of the document containing the media query description.
Range *SourceRange `json:"range,omitempty,omitzero"` // The associated rule (@media or @import) header range in the enclosing stylesheet (if available).
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // Identifier of the stylesheet containing this object (if exists).
MediaList []*MediaQuery `json:"mediaList,omitempty,omitzero"` // Array of media queries.
}
Media CSS media rule descriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSMedia
type MediaQuery ¶
type MediaQuery struct {
Expressions []*MediaQueryExpression `json:"expressions"` // Array of media query expressions.
Active bool `json:"active"` // Whether the media query condition is satisfied.
}
MediaQuery media query descriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-MediaQuery
type MediaQueryExpression ¶
type MediaQueryExpression struct {
Value float64 `json:"value"` // Media query expression value.
Unit string `json:"unit"` // Media query expression units.
Feature string `json:"feature"` // Media query expression feature.
ValueRange *SourceRange `json:"valueRange,omitempty,omitzero"` // The associated range of the value text in the enclosing stylesheet (if available).
ComputedLength float64 `json:"computedLength,omitempty,omitzero"` // Computed length of media query expression (if applicable).
}
MediaQueryExpression media query expression descriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-MediaQueryExpression
type MediaSource ¶ added in v0.157.1
type MediaSource string
MediaSource source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSMedia
const ( MediaSourceMediaRule MediaSource = "mediaRule" MediaSourceImportRule MediaSource = "importRule" MediaSourceLinkedSheet MediaSource = "linkedSheet" MediaSourceInlineSheet MediaSource = "inlineSheet" )
MediaSource values.
func (MediaSource) String ¶ added in v0.157.1
func (t MediaSource) String() string
String returns the MediaSource as string value.
type Navigation ¶
type Navigation struct {
}
Navigation CSS Navigation at-rule descriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSNavigation
type PlatformFontUsage ¶
type PlatformFontUsage struct {
FamilyName string `json:"familyName"` // Font's family name reported by platform.
PostScriptName string `json:"postScriptName"` // Font's PostScript name reported by platform.
IsCustomFont bool `json:"isCustomFont"` // Indicates if the font was downloaded or resolved locally.
GlyphCount float64 `json:"glyphCount"` // Amount of glyphs that were rendered with this font.
}
PlatformFontUsage information about amount of glyphs that were rendered with given font.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-PlatformFontUsage
type PositionTryRule ¶
type PositionTryRule struct {
Name *Value `json:"name"` // The prelude dashed-ident name
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
Style *Style `json:"style"` // Associated style declaration.
Active bool `json:"active"`
}
PositionTryRule CSS @position-try rule representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSPositionTryRule
type Property ¶
type Property struct {
Name string `json:"name"` // The property name.
Value string `json:"value"` // The property value.
Important bool `json:"important"` // Whether the property has "!important" annotation (implies false if absent).
Implicit bool `json:"implicit"` // Whether the property is implicit (implies false if absent).
Text string `json:"text,omitempty,omitzero"` // The full property text as specified in the style.
ParsedOk bool `json:"parsedOk"` // Whether the property is understood by the browser (implies true if absent).
Disabled bool `json:"disabled"` // Whether the property is disabled by the user (present for source-based properties only).
Range *SourceRange `json:"range,omitempty,omitzero"` // The entire property range in the enclosing style declaration (if available).
LonghandProperties []*Property `json:"longhandProperties,omitempty,omitzero"` // Parsed longhand components of this property if it is a shorthand. This field will be empty if the given property is not a shorthand.
}
Property CSS property declaration data.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSProperty
type PropertyRegistration ¶
type PropertyRegistration struct {
PropertyName string `json:"propertyName"`
InitialValue *Value `json:"initialValue,omitempty,omitzero"`
Inherits bool `json:"inherits"`
Syntax string `json:"syntax"`
}
PropertyRegistration representation of a custom property registration through CSS.registerProperty.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSPropertyRegistration
type PropertyRule ¶
type PropertyRule struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
PropertyName *Value `json:"propertyName"` // Associated property name.
Style *Style `json:"style"` // Associated style declaration.
}
PropertyRule CSS property at-rule representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSPropertyRule
type PseudoElementMatches ¶
type PseudoElementMatches struct {
PseudoType cdp.PseudoType `json:"pseudoType"` // Pseudo element type.
PseudoIdentifier string `json:"pseudoIdentifier,omitempty,omitzero"` // Pseudo element custom ident.
Matches []*RuleMatch `json:"matches"` // Matches of CSS rules applicable to the pseudo style.
}
PseudoElementMatches CSS rule collection for a single pseudo style.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-PseudoElementMatches
type ResolveValuesParams ¶
type ResolveValuesParams struct {
Values []string `json:"values"` // Cascade-dependent keywords (revert/revert-layer) do not work.
NodeID cdp.NodeID `json:"nodeId"` // Id of the node in whose context the expression is evaluated
PropertyName string `json:"propertyName,omitempty,omitzero"` // Only longhands and custom property names are accepted.
PseudoType cdp.PseudoType `json:"pseudoType,omitempty,omitzero"` // Pseudo element type, only works for pseudo elements that generate elements in the tree, such as ::before and ::after.
PseudoIdentifier string `json:"pseudoIdentifier,omitempty,omitzero"` // Pseudo element custom ident.
}
ResolveValuesParams are the parameters of the command CSS.resolveValues.
type ResolveValuesResult ¶ added in v0.157.3
type ResolveValuesResult struct {
Results []string `json:"results,omitempty,omitzero"`
}
ResolveValuesResult is the result of the command CSS.resolveValues.
type Rule ¶
type Rule struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
SelectorList *SelectorList `json:"selectorList"` // Rule selector data.
NestingSelectors []string `json:"nestingSelectors,omitempty,omitzero"` // Array of selectors from ancestor style rules, sorted by distance from the current rule.
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
Style *Style `json:"style"` // Associated style declaration.
OriginTreeScopeNodeID cdp.BackendNodeID `json:"originTreeScopeNodeId,omitempty,omitzero"` // The BackendNodeId of the DOM node that constitutes the origin tree scope of this rule.
Media []*Media `json:"media,omitempty,omitzero"` // Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
ContainerQueries []*ContainerQuery `json:"containerQueries,omitempty,omitzero"` // Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.
Supports []*Supports `json:"supports,omitempty,omitzero"` // @supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.
Layers []*Layer `json:"layers,omitempty,omitzero"` // Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.
Scopes []*Scope `json:"scopes,omitempty,omitzero"` // @scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.
RuleTypes []RuleType `json:"ruleTypes,omitempty,omitzero"` // The array keeps the types of ancestor CSSRules from the innermost going outwards.
StartingStyles []*StartingStyle `json:"startingStyles,omitempty,omitzero"` // @starting-style CSS at-rule array. The array enumerates @starting-style at-rules starting with the innermost one, going outwards.
}
Rule CSS rule representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSRule
type RuleMatch ¶
type RuleMatch struct {
Rule *Rule `json:"rule"` // CSS rule in the match.
MatchingSelectors []int64 `json:"matchingSelectors"` // Matching selector indices in the rule's selectorList selectors (0-based).
}
RuleMatch match data for a CSS rule.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-RuleMatch
type RuleType ¶
type RuleType string
RuleType enum indicating the type of a CSS rule, used to represent the order of a style rule's ancestors. This list only contains rule types that are collected during the ancestor rule collection.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSRuleType
const ( RuleTypeMediaRule RuleType = "MediaRule" RuleTypeSupportsRule RuleType = "SupportsRule" RuleTypeContainerRule RuleType = "ContainerRule" RuleTypeLayerRule RuleType = "LayerRule" RuleTypeScopeRule RuleType = "ScopeRule" RuleTypeStyleRule RuleType = "StyleRule" RuleTypeStartingStyleRule RuleType = "StartingStyleRule" )
RuleType values.
type RuleUsage ¶
type RuleUsage struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
StartOffset float64 `json:"startOffset"` // Offset of the start of the rule (including selector) from the beginning of the stylesheet.
EndOffset float64 `json:"endOffset"` // Offset of the end of the rule body from the beginning of the stylesheet.
Used bool `json:"used"` // Indicates whether the rule was actually used by some element in the page.
}
RuleUsage CSS coverage information.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-RuleUsage
type Scope ¶
type Scope struct {
Text string `json:"text"` // Scope rule text.
Range *SourceRange `json:"range,omitempty,omitzero"` // The associated rule header range in the enclosing stylesheet (if available).
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // Identifier of the stylesheet containing this object (if exists).
}
Scope CSS Scope at-rule descriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSScope
type SelectorList ¶
type SelectorList struct {
Selectors []*Value `json:"selectors"` // Selectors in the list.
Text string `json:"text"` // Rule selector text.
}
SelectorList selector list data.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-SelectorList
type SetContainerQueryConditionTextParams ¶
type SetContainerQueryConditionTextParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
Range *SourceRange `json:"range"`
Text string `json:"text"`
}
SetContainerQueryConditionTextParams are the parameters of the command CSS.setContainerQueryConditionText.
type SetContainerQueryConditionTextResult ¶ added in v0.157.3
type SetContainerQueryConditionTextResult struct {
ContainerQuery *ContainerQuery `json:"containerQuery,omitempty,omitzero"` // The resulting CSS container query rule after modification.
}
SetContainerQueryConditionTextResult is the result of the command CSS.setContainerQueryConditionText.
type SetEffectivePropertyValueForNodeParams ¶
type SetEffectivePropertyValueForNodeParams struct {
NodeID cdp.NodeID `json:"nodeId"` // The element id for which to set property.
PropertyName string `json:"propertyName"`
Value string `json:"value"`
}
SetEffectivePropertyValueForNodeParams are the parameters of the command CSS.setEffectivePropertyValueForNode.
type SetKeyframeKeyParams ¶
type SetKeyframeKeyParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
Range *SourceRange `json:"range"`
KeyText string `json:"keyText"`
}
SetKeyframeKeyParams are the parameters of the command CSS.setKeyframeKey.
type SetKeyframeKeyResult ¶ added in v0.157.3
type SetKeyframeKeyResult struct {
KeyText *Value `json:"keyText,omitempty,omitzero"` // The resulting key text after modification.
}
SetKeyframeKeyResult is the result of the command CSS.setKeyframeKey.
type SetLocalFontsEnabledParams ¶
type SetLocalFontsEnabledParams struct {
Enabled bool `json:"enabled"` // Whether rendering of local fonts is enabled.
}
SetLocalFontsEnabledParams are the parameters of the command CSS.setLocalFontsEnabled.
type SetMediaTextParams ¶
type SetMediaTextParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
Range *SourceRange `json:"range"`
Text string `json:"text"`
}
SetMediaTextParams are the parameters of the command CSS.setMediaText.
type SetMediaTextResult ¶ added in v0.157.3
type SetMediaTextResult struct {
Media *Media `json:"media,omitempty,omitzero"` // The resulting CSS media rule after modification.
}
SetMediaTextResult is the result of the command CSS.setMediaText.
type SetNavigationTextParams ¶
type SetNavigationTextParams struct {
}
SetNavigationTextParams are the parameters of the command CSS.setNavigationText.
type SetNavigationTextResult ¶ added in v0.157.3
type SetNavigationTextResult struct {
}
SetNavigationTextResult is the result of the command CSS.setNavigationText.
type SetPropertyRulePropertyNameParams ¶
type SetPropertyRulePropertyNameParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
Range *SourceRange `json:"range"`
PropertyName string `json:"propertyName"`
}
SetPropertyRulePropertyNameParams are the parameters of the command CSS.setPropertyRulePropertyName.
type SetPropertyRulePropertyNameResult ¶ added in v0.157.3
type SetPropertyRulePropertyNameResult struct {
PropertyName *Value `json:"propertyName,omitempty,omitzero"` // The resulting key text after modification.
}
SetPropertyRulePropertyNameResult is the result of the command CSS.setPropertyRulePropertyName.
type SetRuleSelectorParams ¶
type SetRuleSelectorParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
Range *SourceRange `json:"range"`
Selector string `json:"selector"`
}
SetRuleSelectorParams are the parameters of the command CSS.setRuleSelector.
type SetRuleSelectorResult ¶ added in v0.157.3
type SetRuleSelectorResult struct {
SelectorList *SelectorList `json:"selectorList,omitempty,omitzero"` // The resulting selector list after modification.
}
SetRuleSelectorResult is the result of the command CSS.setRuleSelector.
type SetScopeTextParams ¶
type SetScopeTextParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
Range *SourceRange `json:"range"`
Text string `json:"text"`
}
SetScopeTextParams are the parameters of the command CSS.setScopeText.
type SetScopeTextResult ¶ added in v0.157.3
type SetScopeTextResult struct {
Scope *Scope `json:"scope,omitempty,omitzero"` // The resulting CSS Scope rule after modification.
}
SetScopeTextResult is the result of the command CSS.setScopeText.
type SetStyleSheetTextParams ¶
type SetStyleSheetTextParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
Text string `json:"text"`
}
SetStyleSheetTextParams are the parameters of the command CSS.setStyleSheetText.
type SetStyleSheetTextResult ¶ added in v0.157.3
type SetStyleSheetTextResult struct {
SourceMapURL string `json:"sourceMapURL,omitempty,omitzero"` // URL of source map associated with script (if any).
}
SetStyleSheetTextResult is the result of the command CSS.setStyleSheetText.
type SetStyleTextsParams ¶
type SetStyleTextsParams struct {
Edits []*StyleDeclarationEdit `json:"edits"`
NodeForPropertySyntaxValidation cdp.NodeID `json:"nodeForPropertySyntaxValidation,omitempty,omitzero"` // NodeId for the DOM node in whose context custom property declarations for registered properties should be validated. If omitted, declarations in the new rule text can only be validated statically, which may produce incorrect results if the declaration contains a var() for example.
}
SetStyleTextsParams are the parameters of the command CSS.setStyleTexts.
type SetStyleTextsResult ¶ added in v0.157.3
type SetStyleTextsResult struct {
Styles []*Style `json:"styles,omitempty,omitzero"` // The resulting styles after modification.
}
SetStyleTextsResult is the result of the command CSS.setStyleTexts.
type SetSupportsTextParams ¶
type SetSupportsTextParams struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"`
Range *SourceRange `json:"range"`
Text string `json:"text"`
}
SetSupportsTextParams are the parameters of the command CSS.setSupportsText.
type SetSupportsTextResult ¶ added in v0.157.3
type SetSupportsTextResult struct {
Supports *Supports `json:"supports,omitempty,omitzero"` // The resulting CSS Supports rule after modification.
}
SetSupportsTextResult is the result of the command CSS.setSupportsText.
type ShorthandEntry ¶
type ShorthandEntry struct {
Name string `json:"name"` // Shorthand name.
Value string `json:"value"` // Shorthand value.
Important bool `json:"important"` // Whether the property has "!important" annotation (implies false if absent).
}
ShorthandEntry [no description].
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-ShorthandEntry
type SourceRange ¶
type SourceRange struct {
StartLine int64 `json:"startLine"` // Start line of range.
StartColumn int64 `json:"startColumn"` // Start column of range (inclusive).
EndLine int64 `json:"endLine"` // End line of range
EndColumn int64 `json:"endColumn"` // End column of range (exclusive).
}
SourceRange text range within a resource. All numbers are zero-based.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-SourceRange
type Specificity ¶
type Specificity struct {
A int64 `json:"a"` // The a component, which represents the number of ID selectors.
B int64 `json:"b"` // The b component, which represents the number of class selectors, attributes selectors, and pseudo-classes.
C int64 `json:"c"` // The c component, which represents the number of type selectors and pseudo-elements.
Components []*SpecificityComponent `json:"components,omitempty,omitzero"` // Per-simple-selector contributions used to explain this specificity.
}
Specificity specificity: https://drafts.csswg.org/selectors/#specificity-rules.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-Specificity
type SpecificityComponent ¶
type SpecificityComponent struct {
Text string `json:"text"` // The simple selector text that contributes to specificity.
A int64 `json:"a"` // The a component contribution.
B int64 `json:"b"` // The b component contribution.
C int64 `json:"c"` // The c component contribution.
}
SpecificityComponent contribution of an individual simple selector to specificity.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-SpecificityComponent
type StartingStyle ¶
type StartingStyle struct {
Range *SourceRange `json:"range,omitempty,omitzero"` // The associated rule header range in the enclosing stylesheet (if available).
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // Identifier of the stylesheet containing this object (if exists).
}
StartingStyle CSS Starting Style at-rule descriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSStartingStyle
type StopRuleUsageTrackingResult ¶ added in v0.157.3
type StopRuleUsageTrackingResult struct {
RuleUsage []*RuleUsage `json:"ruleUsage,omitempty,omitzero"`
}
StopRuleUsageTrackingResult is the result of the command CSS.stopRuleUsageTracking.
type Style ¶
type Style struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
CSSProperties []*Property `json:"cssProperties"` // CSS properties in the style.
ShorthandEntries []*ShorthandEntry `json:"shorthandEntries"` // Computed values for all shorthands found in the style.
CSSText string `json:"cssText,omitempty,omitzero"` // Style declaration text (if available).
Range *SourceRange `json:"range,omitempty,omitzero"` // Style declaration range in the enclosing stylesheet (if available).
}
Style CSS style representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSStyle
type StyleDeclarationEdit ¶
type StyleDeclarationEdit struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"` // The css style sheet identifier.
Range *SourceRange `json:"range"` // The range of the style text in the enclosing stylesheet.
Text string `json:"text"` // New style text.
}
StyleDeclarationEdit a descriptor of operation to mutate style declaration text.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-StyleDeclarationEdit
type StyleSheetHeader ¶
type StyleSheetHeader struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId"` // The stylesheet identifier.
FrameID cdp.FrameID `json:"frameId"` // Owner frame identifier.
SourceURL string `json:"sourceURL"` // Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed stylesheet imported as a CSS module script).
SourceMapURL string `json:"sourceMapURL,omitempty,omitzero"` // URL of source map associated with the stylesheet (if any).
Origin StyleSheetOrigin `json:"origin"` // Stylesheet origin.
Title string `json:"title"` // Stylesheet title.
OwnerNode cdp.BackendNodeID `json:"ownerNode,omitempty,omitzero"` // The backend id for the owner node of the stylesheet.
Disabled bool `json:"disabled"` // Denotes whether the stylesheet is disabled.
HasSourceURL bool `json:"hasSourceURL"` // Whether the sourceURL field value comes from the sourceURL comment.
IsInline bool `json:"isInline"` // Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.
IsMutable bool `json:"isMutable"` // Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. <link> element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
IsConstructed bool `json:"isConstructed"` // True if this stylesheet is created through new CSSStyleSheet() or imported as a CSS module script.
StartLine float64 `json:"startLine"` // Line offset of the stylesheet within the resource (zero based).
StartColumn float64 `json:"startColumn"` // Column offset of the stylesheet within the resource (zero based).
Length float64 `json:"length"` // Size of the content (in characters).
EndLine float64 `json:"endLine"` // Line offset of the end of the stylesheet within the resource (zero based).
EndColumn float64 `json:"endColumn"` // Column offset of the end of the stylesheet within the resource (zero based).
LoadingFailed bool `json:"loadingFailed"` // If the style sheet was loaded from a network resource, this indicates when the resource failed to load
}
StyleSheetHeader CSS stylesheet metainformation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSStyleSheetHeader
type StyleSheetOrigin ¶
type StyleSheetOrigin string
StyleSheetOrigin stylesheet type: "injected" for stylesheets injected via extension, "user-agent" for user-agent stylesheets, "inspector" for stylesheets created by the inspector (i.e. those holding the "via inspector" rules), "regular" for regular stylesheets.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-StyleSheetOrigin
const ( StyleSheetOriginInjected StyleSheetOrigin = "injected" StyleSheetOriginUserAgent StyleSheetOrigin = "user-agent" StyleSheetOriginInspector StyleSheetOrigin = "inspector" StyleSheetOriginRegular StyleSheetOrigin = "regular" )
StyleSheetOrigin values.
func (StyleSheetOrigin) String ¶
func (t StyleSheetOrigin) String() string
String returns the StyleSheetOrigin as string value.
type Supports ¶
type Supports struct {
Text string `json:"text"` // Supports rule text.
Active bool `json:"active"` // Whether the supports condition is satisfied.
Range *SourceRange `json:"range,omitempty,omitzero"` // The associated rule header range in the enclosing stylesheet (if available).
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // Identifier of the stylesheet containing this object (if exists).
}
Supports CSS Supports at-rule descriptor.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSSupports
type TakeComputedStyleUpdatesResult ¶ added in v0.157.3
type TakeComputedStyleUpdatesResult struct {
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty,omitzero"` // The list of node Ids that have their tracked computed styles updated.
}
TakeComputedStyleUpdatesResult is the result of the command CSS.takeComputedStyleUpdates.
type TakeCoverageDeltaResult ¶ added in v0.157.3
type TakeCoverageDeltaResult struct {
Coverage []*RuleUsage `json:"coverage,omitempty,omitzero"`
Timestamp float64 `json:"timestamp,omitempty,omitzero"` // Monotonically increasing time, in seconds.
}
TakeCoverageDeltaResult is the result of the command CSS.takeCoverageDelta.
type TrackComputedStyleUpdatesForNodeParams ¶
type TrackComputedStyleUpdatesForNodeParams struct {
NodeID cdp.NodeID `json:"nodeId,omitempty,omitzero"`
}
TrackComputedStyleUpdatesForNodeParams are the parameters of the command CSS.trackComputedStyleUpdatesForNode.
type TrackComputedStyleUpdatesParams ¶
type TrackComputedStyleUpdatesParams struct {
PropertiesToTrack []*ComputedStyleProperty `json:"propertiesToTrack"`
}
TrackComputedStyleUpdatesParams are the parameters of the command CSS.trackComputedStyleUpdates.
type TryRule ¶
type TryRule struct {
StyleSheetID cdp.StyleSheetID `json:"styleSheetId,omitempty,omitzero"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
Origin StyleSheetOrigin `json:"origin"` // Parent stylesheet's origin.
Style *Style `json:"style"` // Associated style declaration.
}
TryRule CSS try rule representation.
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSTryRule
type Value ¶
type Value struct {
Text string `json:"text"` // Value text.
Range *SourceRange `json:"range,omitempty,omitzero"` // Value range in the underlying resource (if available).
Specificity *Specificity `json:"specificity,omitempty,omitzero"` // Specificity of the selector.
}
Value data for a simple selector (these are delimited by commas in a selector list).
See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-Value