class CSSDomain
(source)
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.
fun addRule(input: AddRuleRequest): Single<AddRuleResponse>
Inserts a new rule with the given |
|
fun collectClassNames(input: CollectClassNamesRequest): Single<CollectClassNamesResponse>
Returns all class names from specified stylesheet. |
|
fun createStyleSheet(input: CreateStyleSheetRequest): Single<CreateStyleSheetResponse>
Creates a new special "via-inspector" stylesheet in the frame with given |
|
fun disable(): Single<ResponseFrame>
Disables the CSS agent for the given page. |
|
fun enable(): Single<ResponseFrame>
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. |
|
fun events(): Flowable<ProtocolEvent>
Returns flowable capturing all CSS domains events. |
|
fun fontsUpdated(): Flowable<FontsUpdatedEvent>
Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font |
|
fun fontsUpdatedTimed(): Flowable<Timed<FontsUpdatedEvent>>
Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font |
|
fun forcePseudoState(input: ForcePseudoStateRequest): Single<ResponseFrame>
Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser. |
|
fun getBackgroundColors(input: GetBackgroundColorsRequest): Single<GetBackgroundColorsResponse> |
|
fun getComputedStyleForNode(input: GetComputedStyleForNodeRequest): Single<GetComputedStyleForNodeResponse>
Returns the computed style for a DOM node identified by |
|
fun getInlineStylesForNode(input: GetInlineStylesForNodeRequest): Single<GetInlineStylesForNodeResponse>
Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
attributes) for a DOM node identified by |
|
fun getMatchedStylesForNode(input: GetMatchedStylesForNodeRequest): Single<GetMatchedStylesForNodeResponse>
Returns requested styles for a DOM node identified by |
|
fun getMediaQueries(): Single<GetMediaQueriesResponse>
Returns all media queries parsed by the rendering engine. |
|
fun getPlatformFontsForNode(input: GetPlatformFontsForNodeRequest): Single<GetPlatformFontsForNodeResponse>
Requests information about platform fonts which we used to render child TextNodes in the given node. |
|
fun getStyleSheetText(input: GetStyleSheetTextRequest): Single<GetStyleSheetTextResponse>
Returns the current textual content for a stylesheet. |
|
fun mediaQueryResultChanged(): Flowable<ProtocolEvent>
Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features. |
|
fun mediaQueryResultChangedTimed(): Flowable<Timed<ProtocolEvent>>
Fires whenever a MediaQuery result changes (for example, after a browser window has been resized.) The current implementation considers only viewport-dependent media features. |
|
fun setEffectivePropertyValueForNode(input: SetEffectivePropertyValueForNodeRequest): Single<ResponseFrame>
Find a rule with the given active property for the given node and set the new value for this property |
|
fun setKeyframeKey(input: SetKeyframeKeyRequest): Single<SetKeyframeKeyResponse>
Modifies the keyframe rule key text. |
|
fun setMediaText(input: SetMediaTextRequest): Single<SetMediaTextResponse>
Modifies the rule selector. |
|
fun setRuleSelector(input: SetRuleSelectorRequest): Single<SetRuleSelectorResponse>
Modifies the rule selector. |
|
fun setStyleSheetText(input: SetStyleSheetTextRequest): Single<SetStyleSheetTextResponse>
Sets the new stylesheet text. |
|
fun setStyleTexts(input: SetStyleTextsRequest): Single<SetStyleTextsResponse>
Applies specified style edits one after another in the given order. |
|
fun startRuleUsageTracking(): Single<ResponseFrame>
Enables the selector recording. |
|
fun stopRuleUsageTracking(): Single<StopRuleUsageTrackingResponse>
Stop tracking rule usage and return the list of rules that were used since last call to
|
|
fun styleSheetAdded(): Flowable<StyleSheetAddedEvent>
Fired whenever an active document stylesheet is added. |
|
fun styleSheetAddedTimed(): Flowable<Timed<StyleSheetAddedEvent>>
Fired whenever an active document stylesheet is added. |
|
fun styleSheetChanged(): Flowable<StyleSheetChangedEvent>
Fired whenever a stylesheet is changed as a result of the client operation. |
|
fun styleSheetChangedTimed(): Flowable<Timed<StyleSheetChangedEvent>>
Fired whenever a stylesheet is changed as a result of the client operation. |
|
fun styleSheetRemoved(): Flowable<StyleSheetRemovedEvent>
Fired whenever an active document stylesheet is removed. |
|
fun styleSheetRemovedTimed(): Flowable<Timed<StyleSheetRemovedEvent>>
Fired whenever an active document stylesheet is removed. |
|
fun takeCoverageDelta(): Single<TakeCoverageDeltaResponse>
Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation) |