Skip to content

@jimka/typescript-ui / core / InlineStyle

Class: InlineStyle

Defined in: src/typescript/lib/core/StyleTarget.ts:155

Deferred-write buffer for inline element.style writes. Stays detached until InlineStyle.attach runs — typically from Component.init once the root element exists.

Extends

Constructors

new InlineStyle()

ts
new InlineStyle(): InlineStyle

Returns

InlineStyle

Inherited from

StyleTarget.constructor

Methods

attach()

ts
attach(element: HTMLElement): void

Defined in: src/typescript/lib/core/StyleTarget.ts:159

Binds this buffer to a live element and flushes any queued writes.

Parameters

element

HTMLElement

Returns

void


flush()

ts
flush(): void

Defined in: src/typescript/lib/core/StyleTarget.ts:74

Drains the dirty bag onto the live target. No-op when the target is not yet attached — the dirty entries stay queued for the next flush after materialize.

Returns

void

Inherited from

StyleTarget.flush


isMaterialized()

ts
isMaterialized(): boolean

Defined in: src/typescript/lib/core/StyleTarget.ts:85

Returns whether the underlying target has been materialised.

Returns

boolean

Inherited from

StyleTarget.isMaterialized


queue()

ts
queue(key: string, value: null | string): void

Defined in: src/typescript/lib/core/StyleTarget.ts:56

Writes a single style property into the dirty bag without flushing, even when the target is already attached. Callers that own their own batching gate (e.g. autoCommitStyle = false) use this to accumulate writes that StyleTarget.flush will drain later.

Parameters

key

string

The CSS property name (camelCase).

value

The value to set, or null to remove the property.

null | string

Returns

void

Inherited from

StyleTarget.queue


queueMany()

ts
queueMany(values: Record<string, null | string>): void

Defined in: src/typescript/lib/core/StyleTarget.ts:65

Bulk variant of StyleTarget.queue.

Parameters

values

Record<string, null | string>

Camel-cased property keys mapped to string values (or null to clear).

Returns

void

Inherited from

StyleTarget.queueMany


set()

ts
set(key: string, value: null | string): void

Defined in: src/typescript/lib/core/StyleTarget.ts:30

Writes a single style property. Flushes immediately when the target is attached; otherwise queues the entry into the dirty bag.

Parameters

key

string

The CSS property name (camelCase).

value

The value to set, or null to remove the property.

null | string

Returns

void

Inherited from

StyleTarget.set


setMany()

ts
setMany(values: Record<string, null | string>): void

Defined in: src/typescript/lib/core/StyleTarget.ts:43

Bulk variant of StyleTarget.set.

Parameters

values

Record<string, null | string>

Camel-cased property keys mapped to string values (or null to clear).

Returns

void

Inherited from

StyleTarget.setMany