Last updated

API / geotoolkit / report / dom / css / CssStyleSheet / CssStyleSheet

Class: CssStyleSheet

css.CssStyleSheet.CssStyleSheet

Defines CSS Style Sheet

Hierarchy

Table of contents

Constructors
Accessors
Methods

Contents

Constructors

new CssStyleSheet(options)

new CssStyleSheet(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

StyleSheet.constructor

Accessors

cssRules

get cssRules(): Proxy<CssRuleList>

Returns a live css rules list which maintains an up-to-date list of the css rule objects that comprise the stylesheet.

Name

module:geotoolkit/report/dom/css/CssStyleSheet~CssStyleSheet#cssRules

Returns

Proxy<CssRuleList>


disabled

get disabled(): boolean

Is a boolean value representing whether the current stylesheet has been applied or not.

Name

module:geotoolkit/report/dom/css/StyleSheet~StyleSheet#disabled

Returns

boolean

Inherited from

StyleSheet.disabled

set disabled(disabled): void

Is a boolean value representing whether the current stylesheet has been applied or not.

Name

module:geotoolkit/report/dom/css/StyleSheet~StyleSheet#disabled

Parameters

Name Type
disabledboolean

Returns

void

Inherited from

StyleSheet.disabled


href

get href(): string

Returns a string representing the location of the stylesheet.

Name

module:geotoolkit/report/dom/css/StyleSheet~StyleSheet#href

Returns

string

Inherited from

StyleSheet.href


media

get media(): string

Returns a string representing the intended destination medium for style information.

Name

module:geotoolkit/report/dom/css/StyleSheet~StyleSheet#media

Returns

string

Inherited from

StyleSheet.media


ownerNode

get ownerNode(): Node

Returns a Node associating this style sheet with the current document.

Name

module:geotoolkit/report/dom/css/StyleSheet~StyleSheet#ownerNode

Returns

Node

Inherited from

StyleSheet.ownerNode


parentStyleSheet

get parentStyleSheet(): StyleSheet

Returns a string representing the advisory title of the current style sheet.

Name

module:geotoolkit/report/dom/css/StyleSheet~StyleSheet#parentStyleSheet

Returns

StyleSheet

Inherited from

StyleSheet.parentStyleSheet


title

get title(): string

Returns a string representing the advisory title of the current style sheet.

Name

module:geotoolkit/report/dom/css/StyleSheet~StyleSheet#title

Returns

string

Inherited from

StyleSheet.title


type

get type(): string

Returns a string representing the style sheet language for this style sheet.

Name

module:geotoolkit/report/dom/css/StyleSheet~StyleSheet#type

Returns

string

Inherited from

StyleSheet.type

set type(type): void

Returns a string representing the style sheet language for this style sheet.

Name

module:geotoolkit/report/dom/css/StyleSheet~StyleSheet#type

Parameters

Name Type
typestring

Returns

void

Inherited from

StyleSheet.type

Methods

deleteRule

deleteRule(index): CssStyleSheet

Delete Rule at specified index

Parameters

Name Type Description
indexnumberrule index to delete

Returns

CssStyleSheet

this


dispose

dispose(): void

Dispose.

Returns

void

Inherited from

StyleSheet.dispose


getClassName

getClassName(): string

Returns

string

Inherited from

StyleSheet.getClassName


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

StyleSheet.hasEventListener


insertRule

insertRule(cssttext, index?): number

Insert new CSS rule into the current style sheet

Parameters

Name Type Description
cssttextstringa DOMString containing the rule to be inserted. What the inserted rule must contain depends on its type:
Optional indexnumberA positive integer less than or equal to stylesheet.cssRules.length, representing the newly inserted rule's position in CssStyleSheet.cssRules. The default is 0.

Returns

number

The newly inserted rule's index within the stylesheet's rule-list.


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

StyleSheet.isDisposed


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

StyleSheet.isSilent


notify

notify<E>(type, source, args?): CssStyleSheet

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceStyleSheetof the event
Optional argsEventMap[E]arguments of the event

Returns

CssStyleSheet

this

Inherited from

StyleSheet.notify


off

off<E>(type?, callback?): CssStyleSheet

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: CssStyleSheet, args: EventMap[E]) => voidfunction to be called

Returns

CssStyleSheet

this

Inherited from

StyleSheet.off


on

on<E>(type, callback): CssStyleSheet

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: CssStyleSheet, args: EventMap[E]) => voidto be called

Returns

CssStyleSheet

this

Inherited from

StyleSheet.on


replace

replace(cssText): Promise<CssStyleSheet>

Asynchronously replaces the content of the stylesheet and returns a Promise that resolves with the updated CssStyleSheet.

Parameters

Name Type Description
cssTextstringA string containing the style rules to replace the content of the stylesheet. If the string does not contain a parseable list of rules, then the value will be set to an empty string.

Returns

Promise<CssStyleSheet>

A Promise that resolves with a CssStyleSheet.


replaceSync

replaceSync(cssText): CssStyleSheet

Synchronously replaces the content of the stylesheet.

Throws

if cssText is invalid

Parameters

Name Type Description
cssTextstringA string containing the style rules to replace the content of the stylesheet. If the string does not contain a parseable list of rules, then the value will be set to an empty string.

Returns

CssStyleSheet

this


setSilent

setSilent(bool): CssStyleSheet

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

CssStyleSheet

this

Inherited from

StyleSheet.setSilent


getClassName

Static getClassName(): string

Returns

string

Inherited from

StyleSheet.getClassName