css

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package css implements 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the CSS domain with the connection set to conn.

Types

type AddRuleArgs

type AddRuleArgs struct {
	StyleSheetID 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.
}

AddRuleArgs represents the arguments for AddRule in the CSS domain.

func NewAddRuleArgs

func NewAddRuleArgs(styleSheetID StyleSheetID, ruleText string, location SourceRange) *AddRuleArgs

NewAddRuleArgs initializes AddRuleArgs with the required arguments.

type AddRuleReply

type AddRuleReply struct {
	Rule Rule `json:"rule"` // The newly created rule.
}

AddRuleReply represents the return values for AddRule in the CSS domain.

type CollectClassNamesArgs

type CollectClassNamesArgs struct {
	StyleSheetID StyleSheetID `json:"styleSheetId"` // No description.
}

CollectClassNamesArgs represents the arguments for CollectClassNames in the CSS domain.

func NewCollectClassNamesArgs

func NewCollectClassNamesArgs(styleSheetID StyleSheetID) *CollectClassNamesArgs

NewCollectClassNamesArgs initializes CollectClassNamesArgs with the required arguments.

type CollectClassNamesReply

type CollectClassNamesReply struct {
	ClassNames []string `json:"classNames"` // Class name list.
}

CollectClassNamesReply represents the return values for CollectClassNames in the CSS domain.

type ComputedStyleProperty

type ComputedStyleProperty struct {
	Name  string `json:"name"`  // Computed style property name.
	Value string `json:"value"` // Computed style property value.
}

ComputedStyleProperty

type CreateStyleSheetArgs

type CreateStyleSheetArgs struct {
	FrameID page.FrameID `json:"frameId"` // Identifier of the frame where "via-inspector" stylesheet should be created.
}

CreateStyleSheetArgs represents the arguments for CreateStyleSheet in the CSS domain.

func NewCreateStyleSheetArgs

func NewCreateStyleSheetArgs(frameID page.FrameID) *CreateStyleSheetArgs

NewCreateStyleSheetArgs initializes CreateStyleSheetArgs with the required arguments.

type CreateStyleSheetReply

type CreateStyleSheetReply struct {
	StyleSheetID StyleSheetID `json:"styleSheetId"` // Identifier of the created "via-inspector" stylesheet.
}

CreateStyleSheetReply represents the return values for CreateStyleSheet in the CSS domain.

type FontsUpdatedClient

type FontsUpdatedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*FontsUpdatedReply, error)
	rpcc.Stream
}

FontsUpdatedClient is a client for FontsUpdated events. Fires whenever a web font gets loaded.

type FontsUpdatedReply

type FontsUpdatedReply struct {
}

FontsUpdatedReply is the reply for FontsUpdated events.

type ForcePseudoStateArgs

type ForcePseudoStateArgs struct {
	NodeID              dom.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.
}

ForcePseudoStateArgs represents the arguments for ForcePseudoState in the CSS domain.

func NewForcePseudoStateArgs

func NewForcePseudoStateArgs(nodeID dom.NodeID, forcedPseudoClasses []string) *ForcePseudoStateArgs

NewForcePseudoStateArgs initializes ForcePseudoStateArgs with the required arguments.

type GetBackgroundColorsArgs

type GetBackgroundColorsArgs struct {
	NodeID dom.NodeID `json:"nodeId"` // Id of the node to get background colors for.
}

GetBackgroundColorsArgs represents the arguments for GetBackgroundColors in the CSS domain.

func NewGetBackgroundColorsArgs

func NewGetBackgroundColorsArgs(nodeID dom.NodeID) *GetBackgroundColorsArgs

NewGetBackgroundColorsArgs initializes GetBackgroundColorsArgs with the required arguments.

type GetBackgroundColorsReply

type GetBackgroundColorsReply struct {
	BackgroundColors     []string `json:"backgroundColors,omitempty"`     // 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"`     // The computed font size for this node, as a CSS computed value string (e.g. '12px').
	ComputedFontWeight   *string  `json:"computedFontWeight,omitempty"`   // The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').
	ComputedBodyFontSize *string  `json:"computedBodyFontSize,omitempty"` // The computed font size for the document body, as a computed CSS value string (e.g. '16px').
}

GetBackgroundColorsReply represents the return values for GetBackgroundColors in the CSS domain.

type GetComputedStyleForNodeArgs

type GetComputedStyleForNodeArgs struct {
	NodeID dom.NodeID `json:"nodeId"` // No description.
}

GetComputedStyleForNodeArgs represents the arguments for GetComputedStyleForNode in the CSS domain.

func NewGetComputedStyleForNodeArgs

func NewGetComputedStyleForNodeArgs(nodeID dom.NodeID) *GetComputedStyleForNodeArgs

NewGetComputedStyleForNodeArgs initializes GetComputedStyleForNodeArgs with the required arguments.

type GetComputedStyleForNodeReply

type GetComputedStyleForNodeReply struct {
	ComputedStyle []ComputedStyleProperty `json:"computedStyle"` // Computed style for the specified DOM node.
}

GetComputedStyleForNodeReply represents the return values for GetComputedStyleForNode in the CSS domain.

type GetInlineStylesForNodeArgs

type GetInlineStylesForNodeArgs struct {
	NodeID dom.NodeID `json:"nodeId"` // No description.
}

GetInlineStylesForNodeArgs represents the arguments for GetInlineStylesForNode in the CSS domain.

func NewGetInlineStylesForNodeArgs

func NewGetInlineStylesForNodeArgs(nodeID dom.NodeID) *GetInlineStylesForNodeArgs

NewGetInlineStylesForNodeArgs initializes GetInlineStylesForNodeArgs with the required arguments.

type GetInlineStylesForNodeReply

type GetInlineStylesForNodeReply struct {
	InlineStyle     *Style `json:"inlineStyle,omitempty"`     // Inline style for the specified DOM node.
	AttributesStyle *Style `json:"attributesStyle,omitempty"` // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
}

GetInlineStylesForNodeReply represents the return values for GetInlineStylesForNode in the CSS domain.

type GetMatchedStylesForNodeArgs

type GetMatchedStylesForNodeArgs struct {
	NodeID dom.NodeID `json:"nodeId"` // No description.
}

GetMatchedStylesForNodeArgs represents the arguments for GetMatchedStylesForNode in the CSS domain.

func NewGetMatchedStylesForNodeArgs

func NewGetMatchedStylesForNodeArgs(nodeID dom.NodeID) *GetMatchedStylesForNodeArgs

NewGetMatchedStylesForNodeArgs initializes GetMatchedStylesForNodeArgs with the required arguments.

type GetMatchedStylesForNodeReply

type GetMatchedStylesForNodeReply struct {
	InlineStyle       *Style                 `json:"inlineStyle,omitempty"`       // Inline style for the specified DOM node.
	AttributesStyle   *Style                 `json:"attributesStyle,omitempty"`   // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
	MatchedCSSRules   []RuleMatch            `json:"matchedCSSRules,omitempty"`   // CSS rules matching this node, from all applicable stylesheets.
	PseudoElements    []PseudoElementMatches `json:"pseudoElements,omitempty"`    // Pseudo style matches for this node.
	Inherited         []InheritedStyleEntry  `json:"inherited,omitempty"`         // A chain of inherited styles (from the immediate node parent up to the DOM tree root).
	CSSKeyframesRules []KeyframesRule        `json:"cssKeyframesRules,omitempty"` // A list of CSS keyframed animations matching this node.
}

GetMatchedStylesForNodeReply represents the return values for GetMatchedStylesForNode in the CSS domain.

type GetMediaQueriesReply

type GetMediaQueriesReply struct {
	Medias []Media `json:"medias"` // No description.
}

GetMediaQueriesReply represents the return values for GetMediaQueries in the CSS domain.

type GetPlatformFontsForNodeArgs

type GetPlatformFontsForNodeArgs struct {
	NodeID dom.NodeID `json:"nodeId"` // No description.
}

GetPlatformFontsForNodeArgs represents the arguments for GetPlatformFontsForNode in the CSS domain.

func NewGetPlatformFontsForNodeArgs

func NewGetPlatformFontsForNodeArgs(nodeID dom.NodeID) *GetPlatformFontsForNodeArgs

NewGetPlatformFontsForNodeArgs initializes GetPlatformFontsForNodeArgs with the required arguments.

type GetPlatformFontsForNodeReply

type GetPlatformFontsForNodeReply struct {
	Fonts []PlatformFontUsage `json:"fonts"` // Usage statistics for every employed platform font.
}

GetPlatformFontsForNodeReply represents the return values for GetPlatformFontsForNode in the CSS domain.

type GetStyleSheetTextArgs

type GetStyleSheetTextArgs struct {
	StyleSheetID StyleSheetID `json:"styleSheetId"` // No description.
}

GetStyleSheetTextArgs represents the arguments for GetStyleSheetText in the CSS domain.

func NewGetStyleSheetTextArgs

func NewGetStyleSheetTextArgs(styleSheetID StyleSheetID) *GetStyleSheetTextArgs

NewGetStyleSheetTextArgs initializes GetStyleSheetTextArgs with the required arguments.

type GetStyleSheetTextReply

type GetStyleSheetTextReply struct {
	Text string `json:"text"` // The stylesheet text.
}

GetStyleSheetTextReply represents the return values for GetStyleSheetText in the CSS domain.

type InheritedStyleEntry

type InheritedStyleEntry struct {
	InlineStyle     *Style      `json:"inlineStyle,omitempty"` // 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.

type KeyframeRule

type KeyframeRule struct {
	StyleSheetID *StyleSheetID    `json:"styleSheetId,omitempty"` // 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.

type KeyframesRule

type KeyframesRule struct {
	AnimationName Value          `json:"animationName"` // Animation name.
	Keyframes     []KeyframeRule `json:"keyframes"`     // List of keyframes.
}

KeyframesRule CSS keyframes rule representation.

type Media

type Media struct {
	Text string `json:"text"` // Media query text.
	// 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.
	//
	// Values: "mediaRule", "importRule", "linkedSheet", "inlineSheet".
	Source       string        `json:"source"`
	SourceURL    *string       `json:"sourceURL,omitempty"`    // URL of the document containing the media query description.
	Range        *SourceRange  `json:"range,omitempty"`        // The associated rule (@media or @import) header range in the enclosing stylesheet (if available).
	StyleSheetID *StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
	MediaList    []MediaQuery  `json:"mediaList,omitempty"`    // Array of media queries.
}

Media CSS media rule descriptor.

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.

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"`     // The associated range of the value text in the enclosing stylesheet (if available).
	ComputedLength *float64     `json:"computedLength,omitempty"` // Computed length of media query expression (if applicable).
}

MediaQueryExpression Media query expression descriptor.

type MediaQueryResultChangedClient

type MediaQueryResultChangedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*MediaQueryResultChangedReply, error)
	rpcc.Stream
}

MediaQueryResultChangedClient is a client for MediaQueryResultChanged events. Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features.

type MediaQueryResultChangedReply

type MediaQueryResultChangedReply struct {
}

MediaQueryResultChangedReply is the reply for MediaQueryResultChanged events.

type PlatformFontUsage

type PlatformFontUsage struct {
	FamilyName   string  `json:"familyName"`   // Font's family 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.

type Property

type Property struct {
	Name      string       `json:"name"`                // The property name.
	Value     string       `json:"value"`               // The property value.
	Important *bool        `json:"important,omitempty"` // Whether the property has "!important" annotation (implies `false` if absent).
	Implicit  *bool        `json:"implicit,omitempty"`  // Whether the property is implicit (implies `false` if absent).
	Text      *string      `json:"text,omitempty"`      // The full property text as specified in the style.
	ParsedOk  *bool        `json:"parsedOk,omitempty"`  // Whether the property is understood by the browser (implies `true` if absent).
	Disabled  *bool        `json:"disabled,omitempty"`  // Whether the property is disabled by the user (present for source-based properties only).
	Range     *SourceRange `json:"range,omitempty"`     // The entire property range in the enclosing style declaration (if available).
}

Property CSS property declaration data.

type PseudoElementMatches

type PseudoElementMatches struct {
	PseudoType dom.PseudoType `json:"pseudoType"` // Pseudo element type.
	Matches    []RuleMatch    `json:"matches"`    // Matches of CSS rules applicable to the pseudo style.
}

PseudoElementMatches CSS rule collection for a single pseudo style.

type Rule

type Rule struct {
	StyleSheetID *StyleSheetID    `json:"styleSheetId,omitempty"` // 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.
	Origin       StyleSheetOrigin `json:"origin"`                 // Parent stylesheet's origin.
	Style        Style            `json:"style"`                  // Associated style declaration.
	Media        []Media          `json:"media,omitempty"`        // Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
}

Rule CSS rule representation.

type RuleMatch

type RuleMatch struct {
	Rule              Rule  `json:"rule"`              // CSS rule in the match.
	MatchingSelectors []int `json:"matchingSelectors"` // Matching selector indices in the rule's selectorList selectors (0-based).
}

RuleMatch Match data for a CSS rule.

type RuleUsage

type RuleUsage struct {
	StyleSheetID 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.

type SelectorList

type SelectorList struct {
	Selectors []Value `json:"selectors"` // Selectors in the list.
	Text      string  `json:"text"`      // Rule selector text.
}

SelectorList Selector list data.

type SetEffectivePropertyValueForNodeArgs

type SetEffectivePropertyValueForNodeArgs struct {
	NodeID       dom.NodeID `json:"nodeId"`       // The element id for which to set property.
	PropertyName string     `json:"propertyName"` // No description.
	Value        string     `json:"value"`        // No description.
}

SetEffectivePropertyValueForNodeArgs represents the arguments for SetEffectivePropertyValueForNode in the CSS domain.

func NewSetEffectivePropertyValueForNodeArgs

func NewSetEffectivePropertyValueForNodeArgs(nodeID dom.NodeID, propertyName string, value string) *SetEffectivePropertyValueForNodeArgs

NewSetEffectivePropertyValueForNodeArgs initializes SetEffectivePropertyValueForNodeArgs with the required arguments.

type SetKeyframeKeyArgs

type SetKeyframeKeyArgs struct {
	StyleSheetID StyleSheetID `json:"styleSheetId"` // No description.
	Range        SourceRange  `json:"range"`        // No description.
	KeyText      string       `json:"keyText"`      // No description.
}

SetKeyframeKeyArgs represents the arguments for SetKeyframeKey in the CSS domain.

func NewSetKeyframeKeyArgs

func NewSetKeyframeKeyArgs(styleSheetID StyleSheetID, rang SourceRange, keyText string) *SetKeyframeKeyArgs

NewSetKeyframeKeyArgs initializes SetKeyframeKeyArgs with the required arguments.

type SetKeyframeKeyReply

type SetKeyframeKeyReply struct {
	KeyText Value `json:"keyText"` // The resulting key text after modification.
}

SetKeyframeKeyReply represents the return values for SetKeyframeKey in the CSS domain.

type SetMediaTextArgs

type SetMediaTextArgs struct {
	StyleSheetID StyleSheetID `json:"styleSheetId"` // No description.
	Range        SourceRange  `json:"range"`        // No description.
	Text         string       `json:"text"`         // No description.
}

SetMediaTextArgs represents the arguments for SetMediaText in the CSS domain.

func NewSetMediaTextArgs

func NewSetMediaTextArgs(styleSheetID StyleSheetID, rang SourceRange, text string) *SetMediaTextArgs

NewSetMediaTextArgs initializes SetMediaTextArgs with the required arguments.

type SetMediaTextReply

type SetMediaTextReply struct {
	Media Media `json:"media"` // The resulting CSS media rule after modification.
}

SetMediaTextReply represents the return values for SetMediaText in the CSS domain.

type SetRuleSelectorArgs

type SetRuleSelectorArgs struct {
	StyleSheetID StyleSheetID `json:"styleSheetId"` // No description.
	Range        SourceRange  `json:"range"`        // No description.
	Selector     string       `json:"selector"`     // No description.
}

SetRuleSelectorArgs represents the arguments for SetRuleSelector in the CSS domain.

func NewSetRuleSelectorArgs

func NewSetRuleSelectorArgs(styleSheetID StyleSheetID, rang SourceRange, selector string) *SetRuleSelectorArgs

NewSetRuleSelectorArgs initializes SetRuleSelectorArgs with the required arguments.

type SetRuleSelectorReply

type SetRuleSelectorReply struct {
	SelectorList SelectorList `json:"selectorList"` // The resulting selector list after modification.
}

SetRuleSelectorReply represents the return values for SetRuleSelector in the CSS domain.

type SetStyleSheetTextArgs

type SetStyleSheetTextArgs struct {
	StyleSheetID StyleSheetID `json:"styleSheetId"` // No description.
	Text         string       `json:"text"`         // No description.
}

SetStyleSheetTextArgs represents the arguments for SetStyleSheetText in the CSS domain.

func NewSetStyleSheetTextArgs

func NewSetStyleSheetTextArgs(styleSheetID StyleSheetID, text string) *SetStyleSheetTextArgs

NewSetStyleSheetTextArgs initializes SetStyleSheetTextArgs with the required arguments.

type SetStyleSheetTextReply

type SetStyleSheetTextReply struct {
	SourceMapURL *string `json:"sourceMapURL,omitempty"` // URL of source map associated with script (if any).
}

SetStyleSheetTextReply represents the return values for SetStyleSheetText in the CSS domain.

type SetStyleTextsArgs

type SetStyleTextsArgs struct {
	Edits []StyleDeclarationEdit `json:"edits"` // No description.
}

SetStyleTextsArgs represents the arguments for SetStyleTexts in the CSS domain.

func NewSetStyleTextsArgs

func NewSetStyleTextsArgs(edits []StyleDeclarationEdit) *SetStyleTextsArgs

NewSetStyleTextsArgs initializes SetStyleTextsArgs with the required arguments.

type SetStyleTextsReply

type SetStyleTextsReply struct {
	Styles []Style `json:"styles"` // The resulting styles after modification.
}

SetStyleTextsReply represents the return values for SetStyleTexts in the CSS domain.

type ShorthandEntry

type ShorthandEntry struct {
	Name      string `json:"name"`                // Shorthand name.
	Value     string `json:"value"`               // Shorthand value.
	Important *bool  `json:"important,omitempty"` // Whether the property has "!important" annotation (implies `false` if absent).
}

ShorthandEntry

type SourceRange

type SourceRange struct {
	StartLine   int `json:"startLine"`   // Start line of range.
	StartColumn int `json:"startColumn"` // Start column of range (inclusive).
	EndLine     int `json:"endLine"`     // End line of range
	EndColumn   int `json:"endColumn"`   // End column of range (exclusive).
}

SourceRange Text range within a resource. All numbers are zero-based.

type StopRuleUsageTrackingReply

type StopRuleUsageTrackingReply struct {
	RuleUsage []RuleUsage `json:"ruleUsage"` // No description.
}

StopRuleUsageTrackingReply represents the return values for StopRuleUsageTracking in the CSS domain.

type Style

type Style struct {
	StyleSheetID     *StyleSheetID    `json:"styleSheetId,omitempty"` // 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"`      // Style declaration text (if available).
	Range            *SourceRange     `json:"range,omitempty"`        // Style declaration range in the enclosing stylesheet (if available).
}

Style CSS style representation.

type StyleDeclarationEdit

type StyleDeclarationEdit struct {
	StyleSheetID 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.

type StyleSheetAddedClient

type StyleSheetAddedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*StyleSheetAddedReply, error)
	rpcc.Stream
}

StyleSheetAddedClient is a client for StyleSheetAdded events. Fired whenever an active document stylesheet is added.

type StyleSheetAddedReply

type StyleSheetAddedReply struct {
	Header StyleSheetHeader `json:"header"` // Added stylesheet metainfo.
}

StyleSheetAddedReply is the reply for StyleSheetAdded events.

type StyleSheetChangedClient

type StyleSheetChangedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*StyleSheetChangedReply, error)
	rpcc.Stream
}

StyleSheetChangedClient is a client for StyleSheetChanged events. Fired whenever a stylesheet is changed as a result of the client operation.

type StyleSheetChangedReply

type StyleSheetChangedReply struct {
	StyleSheetID StyleSheetID `json:"styleSheetId"` // No description.
}

StyleSheetChangedReply is the reply for StyleSheetChanged events.

type StyleSheetHeader

type StyleSheetHeader struct {
	StyleSheetID StyleSheetID       `json:"styleSheetId"`           // The stylesheet identifier.
	FrameID      page.FrameID       `json:"frameId"`                // Owner frame identifier.
	SourceURL    string             `json:"sourceURL"`              // Stylesheet resource URL.
	SourceMapURL *string            `json:"sourceMapURL,omitempty"` // URL of source map associated with the stylesheet (if any).
	Origin       StyleSheetOrigin   `json:"origin"`                 // Stylesheet origin.
	Title        string             `json:"title"`                  // Stylesheet title.
	OwnerNode    *dom.BackendNodeID `json:"ownerNode,omitempty"`    // The backend id for the owner node of the stylesheet.
	Disabled     bool               `json:"disabled"`               // Denotes whether the stylesheet is disabled.
	HasSourceURL *bool              `json:"hasSourceURL,omitempty"` // 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.
	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).
}

StyleSheetHeader CSS stylesheet metainformation.

type StyleSheetID

type StyleSheetID string

StyleSheetID

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.

const (
	StyleSheetOriginNotSet    StyleSheetOrigin = ""
	StyleSheetOriginInjected  StyleSheetOrigin = "injected"
	StyleSheetOriginUserAgent StyleSheetOrigin = "user-agent"
	StyleSheetOriginInspector StyleSheetOrigin = "inspector"
	StyleSheetOriginRegular   StyleSheetOrigin = "regular"
)

StyleSheetOrigin as enums.

func (StyleSheetOrigin) String

func (e StyleSheetOrigin) String() string

func (StyleSheetOrigin) Valid

func (e StyleSheetOrigin) Valid() bool

type StyleSheetRemovedClient

type StyleSheetRemovedClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*StyleSheetRemovedReply, error)
	rpcc.Stream
}

StyleSheetRemovedClient is a client for StyleSheetRemoved events. Fired whenever an active document stylesheet is removed.

type StyleSheetRemovedReply

type StyleSheetRemovedReply struct {
	StyleSheetID StyleSheetID `json:"styleSheetId"` // Identifier of the removed stylesheet.
}

StyleSheetRemovedReply is the reply for StyleSheetRemoved events.

type TakeCoverageDeltaReply

type TakeCoverageDeltaReply struct {
	Coverage []RuleUsage `json:"coverage"` // No description.
}

TakeCoverageDeltaReply represents the return values for TakeCoverageDelta in the CSS domain.

type Value

type Value struct {
	Text  string       `json:"text"`            // Value text.
	Range *SourceRange `json:"range,omitempty"` // Value range in the underlying resource (if available).
}

Value Data for a simple selector (these are delimited by commas in a selector list).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL