Misc

Import

Type

ComplexAttributeConverter

Contains types that are part of the unstable debug API.

Import

Details

Everything in this API is not stable and may change or be removed in the future, even on patch releases.

Methods and properties

When Lit is running in dev mode and window.emitLitDebugLogEvents is true, we will emit 'lit-debug' events to window, with live details about the update and render lifecycle. These can be useful for writing debug tooling and visualizations.

Details

Please be aware that running with window.emitLitDebugLogEvents has performance overhead, making certain operations that are normally very cheap (like a no-op render) much slower, because we must copy data and dispatch events.

Change function that returns true if value is different from oldValue. This method is used as the default for a property's hasChanged function.

Import

Signature

notEqual(value, old): boolean

Parameters

value
unknown
old
unknown

Contains types that are part of the unstable debug API.

Import

Details

Everything in this API is not stable and may change or be removed in the future, even on patch releases.

Methods and properties

When Lit is running in dev mode and window.emitLitDebugLogEvents is true, we will emit 'lit-debug' events to window, with live details about the update and render lifecycle. These can be useful for writing debug tooling and visualizations.

Details

Please be aware that running with window.emitLitDebugLogEvents has performance overhead, making certain operations that are normally very cheap (like a no-op render) much slower, because we must copy data and dispatch events.

Contains types that are part of the unstable debug API.

Import

Details

Everything in this API is not stable and may change or be removed in the future, even on patch releases.

Methods and properties

When Lit is running in dev mode and window.emitLitDebugLogEvents is true, we will emit 'lit-debug' events to window, with live details about the update and render lifecycle. These can be useful for writing debug tooling and visualizations.

Details

Please be aware that running with window.emitLitDebugLogEvents has performance overhead, making certain operations that are normally very cheap (like a no-op render) much slower, because we must copy data and dispatch events.

Import

Import

Methods and properties

values: Array<unknown>

Permalink to values View source

Import

Import

Import

Signature

HasChanged(value, old): boolean

Parameters

value
unknown
old
unknown

Import

Type

TemplateResult<HTML_RESULT>

Import

Type

(element: ReactiveElement) => void

Do not use, instead prefer PropertyValues.

Import

Methods and properties

delete(k): boolean

Permalink to delete
Parameters
k
K

get(k): T[K]

Permalink to get
Parameters
k
K

has(k): boolean

Permalink to has
Parameters
k
K
Parameters
key
K
value
T[K]

A top-level ChildPart returned from render that manages the connected state of AsyncDirectives created throughout the tree below it.

Import

Methods and properties

The part's trailing marker node, if any. See .parentNode for more information.

The parent node into which the part renders its content.

Details

A ChildPart's content consists of a range of adjacent child nodes of .parentNode, possibly bordered by 'marker nodes' (.startNode and .endNode).

  • If both .startNode and .endNode are non-null, then the part's content consists of all siblings between .startNode and .endNode, exclusively.

  • If .startNode is non-null but .endNode is null, then the part's content consists of all siblings following .startNode, up to and including the last child of .parentNode. If .endNode is non-null, then .startNode will always be non-null.

  • If both .endNode and .startNode are null, then the part's content consists of all child nodes of .parentNode.

The part's leading marker node, if any. See .parentNode for more information.

setConnected(isConnected): void

Permalink to setConnected

Sets the connection state for AsyncDirectives contained within this root ChildPart.

Parameters
isConnected
boolean

Whether directives within this tree should be connected or not

Details

lit-html does not automatically monitor the connectedness of DOM rendered; as such, it is the responsibility of the caller to render to ensure that part.setConnected(false) is called before the part object is potentially discarded, to ensure that AsyncDirectives have a chance to dispose of any resources being held. If a RootPart that was prevously disconnected is subsequently re-connected (and its AsyncDirectives should re-connect), setConnected(true) should be called.

Import

Type

(value: unknown) => unknown

A string representing one of the supported dev mode warning categories.

Import

Type

"change-in-update" | "migration"