Class: UseElement
Hierarchy​
↳
UseElement
Constructors​
constructor​
• new UseElement(document
, node?
, captureTextNodes?
)
Parameters​
Name | Type | Default value |
---|---|---|
document | Document | undefined |
node? | HTMLElement | undefined |
captureTextNodes | boolean | false |
Inherited from​
Defined in​
Properties​
ignoreChildTypes​
â–ª Static
Readonly
ignoreChildTypes: string
[]
Inherited from​
RenderedElement.ignoreChildTypes
Defined in​
attributes​
• Readonly
attributes: Record
<string
, Property
<unknown
>> = {}
Inherited from​
Defined in​
styles​
• Readonly
styles: Record
<string
, Property
<unknown
>> = {}
Inherited from​
Defined in​
stylesSpecificity​
• Readonly
stylesSpecificity: Record
<string
, string
> = {}
Inherited from​
RenderedElement.stylesSpecificity
Defined in​
animationFrozen​
• animationFrozen: boolean
= false
Inherited from​
RenderedElement.animationFrozen
Defined in​
animationFrozenValue​
• animationFrozenValue: string
= ''
Inherited from​
RenderedElement.animationFrozenValue
Defined in​
parent​
• parent: Element
= null
Inherited from​
Defined in​
children​
• children: Element
[] = []
Inherited from​
Defined in​
document​
• Protected
Readonly
document: Document
Inherited from​
Defined in​
node​
• Protected
Optional
Readonly
node: HTMLElement
Inherited from​
Defined in​
captureTextNodes​
• Protected
Readonly
captureTextNodes: boolean
= false
Inherited from​
RenderedElement.captureTextNodes
Defined in​
type​
• type: string
= 'use'
Overrides​
Defined in​
cachedElement​
• Private
cachedElement: PathElement
Defined in​
Accessors​
element​
• Protected
get
element(): PathElement
Returns​
Defined in​
src/Document/UseElement.ts:125
Methods​
getAttribute​
â–¸ getAttribute(name
, createIfNotExists?
): Property
<unknown
>
Parameters​
Name | Type | Default value |
---|---|---|
name | string | undefined |
createIfNotExists | boolean | false |
Returns​
Property
<unknown
>
Inherited from​
Defined in​
getHrefAttribute​
â–¸ getHrefAttribute(): Property
<unknown
>
Returns​
Property
<unknown
>
Inherited from​
RenderedElement.getHrefAttribute
Defined in​
getStyle​
â–¸ getStyle(name
, createIfNotExists?
, skipAncestors?
): Property
<unknown
>
Parameters​
Name | Type | Default value |
---|---|---|
name | string | undefined |
createIfNotExists | boolean | false |
skipAncestors | boolean | false |
Returns​
Property
<unknown
>
Inherited from​
Defined in​
render​
â–¸ render(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void
Inherited from​
Defined in​
applyEffects​
â–¸ Protected
applyEffects(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void
Inherited from​
Defined in​
addChild​
â–¸ Protected
addChild(childNode
): void
Parameters​
Name | Type |
---|---|
childNode | HTMLElement | Element |
Returns​
void
Inherited from​
Defined in​
matchesSelector​
â–¸ Protected
matchesSelector(selector
): boolean
Parameters​
Name | Type |
---|---|
selector | string |
Returns​
boolean
Inherited from​
RenderedElement.matchesSelector
Defined in​
addStylesFromStyleDefinition​
â–¸ addStylesFromStyleDefinition(): void
Returns​
void
Inherited from​
RenderedElement.addStylesFromStyleDefinition
Defined in​
removeStyles​
â–¸ Protected
removeStyles(element
, ignoreStyles
): [string
, string
][]
Parameters​
Name | Type |
---|---|
element | Element |
ignoreStyles | string [] |
Returns​
[string
, string
][]
Inherited from​
Defined in​
restoreStyles​
â–¸ Protected
restoreStyles(element
, styles
): void
Parameters​
Name | Type |
---|---|
element | Element |
styles | [string , string ][] |
Returns​
void
Inherited from​
Defined in​
isFirstChild​
â–¸ isFirstChild(): boolean
Returns​
boolean
Inherited from​
Defined in​
calculateOpacity​
â–¸ Protected
calculateOpacity(): number
Returns​
number
Inherited from​
RenderedElement.calculateOpacity
Defined in​
src/Document/RenderedElement.ts:13
clearContext​
â–¸ clearContext(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void
Inherited from​
Defined in​
src/Document/RenderedElement.ts:215
setContext​
â–¸ setContext(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void
Overrides​
Defined in​
path​
â–¸ path(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void
Defined in​
renderChildren​
â–¸ renderChildren(ctx
): void
Parameters​
Name | Type |
---|---|
ctx | RenderingContext2D |
Returns​
void
Overrides​
RenderedElement.renderChildren
Defined in​
getBoundingBox​
â–¸ getBoundingBox(ctx
): BoundingBox
Parameters​
Name | Type |
---|---|
ctx | CanvasRenderingContext2D |
Returns​
Defined in​
src/Document/UseElement.ts:102
elementTransform​
â–¸ elementTransform(): Transform