BlockSuite API Documentation / @blocksuite/inline / VElement
Class: VElement<T>
Extends
LitElement
Type Parameters
• T extends BaseTextAttributes
= BaseTextAttributes
Constructors
new VElement()
new VElement<
T
>():VElement
<T
>
Returns
VElement
<T
>
Inherited from
LitElement.constructor
Defined in
node_modules/@lit/reactive-element/development/reactive-element.d.ts:504
Other
delta
Defined in
packages/framework/inline/src/components/v-element.ts:85
endOffset
Defined in
packages/framework/inline/src/components/v-element.ts:90
lineIndex
Defined in
packages/framework/inline/src/components/v-element.ts:93
selected
Defined in
packages/framework/inline/src/components/v-element.ts:96
startOffset
Defined in
packages/framework/inline/src/components/v-element.ts:99
rendering
createRenderRoot()
createRenderRoot():
VElement
<T
>
Returns
VElement
<T
>
Overrides
LitElement.createRenderRoot
Defined in
packages/framework/inline/src/components/v-element.ts:15
render()
render():
TemplateResult
<1
> | typeofnothing
Invoked on each update to perform rendering tasks. This method may return any value renderable by lit-html's ChildPart
- typically a TemplateResult
. Setting properties inside this method will not trigger the element to update.
Returns
TemplateResult
<1
> | typeof nothing
Overrides
LitElement.render
Defined in
packages/framework/inline/src/components/v-element.ts:41
updates
getUpdateComplete()
getUpdateComplete():
Promise
<boolean
>
Override point for the updateComplete
promise.
It is not safe to override the updateComplete
getter directly due to a limitation in TypeScript which means it is not possible to call a superclass getter (e.g. super.updateComplete.then(...)
) when the target language is ES5 (https://github.com/microsoft/TypeScript/issues/338). This method should be overridden instead. For example:
class MyElement extends LitElement {
override async getUpdateComplete() {
const result = await super.getUpdateComplete();
await this._myChild.updateComplete;
return result;
}
}
Returns
Promise
<boolean
>
A promise of a boolean that resolves to true if the update completed without triggering another update.
Overrides
LitElement.getUpdateComplete
Defined in
packages/framework/inline/src/components/v-element.ts:19