Class RmlElement
Inheritance
BaseObject
RmlElement
Inherited Members
BaseObject.constructor
BaseObject.type
BaseObject.valid
BaseObject.id
BaseObject.destroy
BaseObject.getMetaDataKeys
BaseObject.getSyncedMeta
BaseObject.hasSyncedMeta
BaseObject.getSyncedMetaKeys
BaseObject.refCount
Package: @altmp/altv-types
Syntax
class RmlElement extends BaseObject
Properties
|
Improve this Doc
View Source
relativeOffset
Declaration
public readonly relativeOffset: Vector2
Property Value
|
Improve this Doc
View Source
absoluteOffset
Declaration
public readonly absoluteOffset: Vector2
Property Value
|
Improve this Doc
View Source
baseline
Declaration
public readonly baseline: number
Property Value
|
Improve this Doc
View Source
zIndex
Declaration
public readonly zIndex: number
Property Value
|
Improve this Doc
View Source
containingBlock
Declaration
public readonly containingBlock: Vector2
Property Value
|
Improve this Doc
View Source
focusedElement
Declaration
public readonly focusedElement: null | RmlElement
Property Value
|
Improve this Doc
View Source
tagName
Declaration
public readonly tagName: string
Property Value
|
Improve this Doc
View Source
rmlId
Declaration
Property Value
|
Improve this Doc
View Source
isOwned
Declaration
public readonly isOwned: boolean
Property Value
|
Improve this Doc
View Source
absoluteLeft
Declaration
public readonly absoluteLeft: number
Property Value
|
Improve this Doc
View Source
absoluteTop
Declaration
public readonly absoluteTop: number
Property Value
|
Improve this Doc
View Source
clientLeft
Declaration
public readonly clientLeft: number
Property Value
|
Improve this Doc
View Source
clientTop
Declaration
public readonly clientTop: number
Property Value
|
Improve this Doc
View Source
clientWidth
Declaration
public readonly clientWidth: number
Property Value
|
Improve this Doc
View Source
clientHeight
Declaration
public readonly clientHeight: number
Property Value
|
Improve this Doc
View Source
offsetLeft
Declaration
public readonly offsetLeft: number
Property Value
|
Improve this Doc
View Source
offsetTop
Declaration
public readonly offsetTop: number
Property Value
|
Improve this Doc
View Source
offsetWidth
Declaration
public readonly offsetWidth: number
Property Value
|
Improve this Doc
View Source
offsetHeight
Declaration
public readonly offsetHeight: number
Property Value
|
Improve this Doc
View Source
Declaration
public scrollLeft: number
Property Value
|
Improve this Doc
View Source
Declaration
Property Value
|
Improve this Doc
View Source
Declaration
public readonly scrollWidth: number
Property Value
|
Improve this Doc
View Source
Declaration
public readonly scrollHeight: number
Property Value
|
Improve this Doc
View Source
isVisible
Declaration
public readonly isVisible: boolean
Property Value
|
Improve this Doc
View Source
parent
Declaration
public readonly parent: null | RmlElement
Property Value
|
Improve this Doc
View Source
nextSibling
Declaration
public readonly nextSibling: null | RmlElement
Property Value
|
Improve this Doc
View Source
previousSibling
Declaration
public readonly previousSibling: null | RmlElement
Property Value
|
Improve this Doc
View Source
firstChild
Declaration
public readonly firstChild: null | RmlElement
Property Value
|
Improve this Doc
View Source
lastChild
Declaration
public readonly lastChild: null | RmlElement
Property Value
|
Improve this Doc
View Source
childCount
Declaration
public readonly childCount: number
Property Value
|
Improve this Doc
View Source
hasChildren
Declaration
public readonly hasChildren: boolean
Property Value
|
Improve this Doc
View Source
innerRML
Declaration
Property Value
|
Improve this Doc
View Source
ownerDocument
Declaration
public readonly ownerDocument: RmlDocument
Property Value
|
Improve this Doc
View Source
childNodes
Declaration
public readonly childNodes: readonly RmlElement[]
Property Value
|
Improve this Doc
View Source
style
Declaration
public style: Record<string, string>
Property Value
Type |
Description |
Record<string, string> |
|
Methods
|
Improve this Doc
View Source
on(string, (senderElement: RmlElement, ...args: any[]) => void)
Declaration
public on(eventName: string, func: (senderElement: RmlElement, ...args: any[]) => void): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
(senderElement: RmlElement, ...args: any[]) => void |
func |
|
|
Improve this Doc
View Source
off(string, (...args: any[]) => void)
Declaration
public off(eventName: string, func: (...args: any[]) => void): void
Parameters
Type |
Name |
Description |
string |
eventName |
|
(...args: any[]) => void |
func |
|
|
Improve this Doc
View Source
getEventListeners(string)
Declaration
public getEventListeners(eventName: string): readonly (senderElement: RmlElement, ...args: any[]) => void[]
Parameters
Type |
Name |
Description |
string |
eventName |
|
Returns
Type |
Description |
readonly (senderElement: RmlElement, ...args: any[]) => void[] |
|
|
Improve this Doc
View Source
appendChild(RmlElement)
Declaration
public appendChild(child: RmlElement): void
Parameters
|
Improve this Doc
View Source
insertBefore(RmlElement, RmlElement)
Declaration
public insertBefore(child: RmlElement, adjacent: RmlElement): void
Parameters
|
Improve this Doc
View Source
replaceChild(RmlElement, RmlElement)
Declaration
public replaceChild(newElem: RmlElement, oldElem: RmlElement): void
Parameters
|
Improve this Doc
View Source
removeChild(RmlElement)
Declaration
public removeChild(child: RmlElement): void
Parameters
|
Improve this Doc
View Source
addClass(string)
Declaration
public addClass(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
removeClass(string)
Declaration
public removeClass(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
hasClass(string)
Declaration
public hasClass(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
getClassList()
Declaration
public getClassList(): readonly string[]
Returns
Type |
Description |
readonly string[] |
|
|
Improve this Doc
View Source
addPseudoClass(string)
Declaration
public addPseudoClass(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
removePseudoClass(string)
Declaration
public removePseudoClass(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
hasPseudoClass(string)
Declaration
public hasPseudoClass(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
getPseudoClassList()
Declaration
public getPseudoClassList(): readonly string[]
Returns
Type |
Description |
readonly string[] |
|
|
Improve this Doc
View Source
setOffset(RmlElement, IVector2, boolean)
Declaration
public setOffset(element: RmlElement, offset: IVector2, fixed?: boolean): void
Parameters
|
Improve this Doc
View Source
isPointWithinElement(IVector2)
Declaration
public isPointWithinElement(point: IVector2): boolean
Parameters
Returns
|
Improve this Doc
View Source
setProperty(string, string)
Declaration
public setProperty(name: string, value: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
string |
value |
|
Returns
|
Improve this Doc
View Source
removeProperty(string)
Declaration
public removeProperty(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
hasProperty(string)
Declaration
public hasProperty(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
hasLocalProperty(string)
Declaration
public hasLocalProperty(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
getProperty(string)
Declaration
public getProperty(name: string): string
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
getLocalProperty(string)
Declaration
public getLocalProperty(name: string): string
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
getPropertyAbsoluteValue(string)
Declaration
public getPropertyAbsoluteValue(name: string): number
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
setAttribute(string, string)
Declaration
public setAttribute(name: string, value: string): void
Parameters
Type |
Name |
Description |
string |
name |
|
string |
value |
|
|
Improve this Doc
View Source
removeAttribute(string)
Declaration
public removeAttribute(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
hasAttribute(string)
Declaration
public hasAttribute(name: string): boolean
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
getAttribute(string)
Declaration
public getAttribute(name: string): string
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
|
Improve this Doc
View Source
getAttributes()
Declaration
public getAttributes(): Record<string, string>
Returns
Type |
Description |
Record<string, string> |
|
|
Improve this Doc
View Source
closest(string)
Declaration
public closest(selectors: string): null | RmlElement
Parameters
Type |
Name |
Description |
string |
selectors |
|
Returns
|
Improve this Doc
View Source
getElementByID(string)
Declaration
public getElementByID(id: string): null | RmlElement
Parameters
Type |
Name |
Description |
string |
id |
|
Returns
|
Improve this Doc
View Source
getElementsByTagName(string)
Declaration
public getElementsByTagName(tag: string): readonly RmlElement[]
Parameters
Type |
Name |
Description |
string |
tag |
|
Returns
|
Improve this Doc
View Source
getElementsByClassName(string)
Declaration
public getElementsByClassName(className: string): readonly RmlElement[]
Parameters
Type |
Name |
Description |
string |
className |
|
Returns
|
Improve this Doc
View Source
querySelector(string)
Declaration
public querySelector(selector: string): null | RmlElement
Parameters
Type |
Name |
Description |
string |
selector |
|
Returns
|
Improve this Doc
View Source
querySelectorAll(string)
Declaration
public querySelectorAll(selector: string): readonly RmlElement[]
Parameters
Type |
Name |
Description |
string |
selector |
|
Returns
|
Improve this Doc
View Source
focus()
Declaration
Returns
|
Improve this Doc
View Source
blur()
Declaration
|
Improve this Doc
View Source
click()
Declaration
|
Improve this Doc
View Source
Declaration
public scrollIntoView(alignToTop?: boolean): void
Parameters
Type |
Name |
Description |
boolean |
alignToTop |
|