Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RmlDocument

Hierarchy

Index

Constructors

constructor

Properties

Readonly absoluteLeft

absoluteLeft: number

Readonly absoluteOffset

absoluteOffset: Vector2

Readonly absoluteTop

absoluteTop: number

Readonly baseline

baseline: number

Readonly body

Readonly childCount

childCount: number

Readonly childNodes

childNodes: readonly RmlElement[]

Readonly clientHeight

clientHeight: number

Readonly clientLeft

clientLeft: number

Readonly clientTop

clientTop: number

Readonly clientWidth

clientWidth: number

Readonly containingBlock

containingBlock: Vector2

Readonly firstChild

firstChild: RmlElement | null

Readonly focusedElement

focusedElement: RmlElement | null

Readonly hasChildren

hasChildren: boolean

Readonly id

id: number

innerRML

innerRML: string

Readonly isModal

isModal: boolean

Readonly isOwned

isOwned: boolean

Readonly isRemote

isRemote: boolean

Whether this entity was created clientside or serverside. (Clientside = false, Serverside = true).

Readonly isVisible

isVisible: boolean

Readonly lastChild

lastChild: RmlElement | null

Readonly nextSibling

nextSibling: RmlElement | null

Readonly offsetHeight

offsetHeight: number

Readonly offsetLeft

offsetLeft: number

Readonly offsetTop

offsetTop: number

Readonly offsetWidth

offsetWidth: number

Readonly ownerDocument

ownerDocument: RmlDocument

Readonly parent

parent: RmlElement | null

Readonly previousSibling

previousSibling: RmlElement | null

Readonly refCount

refCount: number

Returns the ref count of the entity.

remarks

It's only available in debug-mode.

Readonly relativeOffset

relativeOffset: Vector2

Readonly remoteID

remoteID: number

The serverside id of this entity.

rmlId

rmlId: string

Readonly scrollHeight

scrollHeight: number

scrollLeft

scrollLeft: number

scrollTop

scrollTop: number

Readonly scrollWidth

scrollWidth: number

Readonly sourceUrl

sourceUrl: string

style

style: Record<string, string>

Readonly tagName

tagName: string

title

title: string

Readonly type

Type of the object.

Readonly valid

valid: boolean

Object usability.

returns

False if object is no longer usable.

Readonly zIndex

zIndex: number

Methods

addClass

  • addClass(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

addPseudoClass

  • addPseudoClass(name: string): boolean

appendChild

blur

  • blur(): void
  • Returns void

click

  • click(): void
  • Returns void

closest

createElement

  • Parameters

    • tag: string

    Returns RmlElement

createTextNode

  • Parameters

    • text: string

    Returns RmlElement

deleteMeta

  • deleteMeta(key: string): void
  • deleteMeta<K>(key: K): void

destroy

  • destroy(): void
  • Removes the object from the world.

    Returns void

focus

  • focus(): boolean
  • Returns boolean

getAttribute

  • getAttribute(name: string): string
  • Parameters

    • name: string

    Returns string

getAttributes

  • getAttributes(): Record<string, string>

getClassList

  • getClassList(): readonly string[]

getElementByID

getElementsByClassName

  • getElementsByClassName(className: string): readonly RmlElement[]

getElementsByTagName

  • getElementsByTagName(tag: string): readonly RmlElement[]

getEventListeners

  • getEventListeners(eventName: string): readonly ((senderElement: RmlElement, ...args: any[]) => void)[]

getLocalProperty

  • getLocalProperty(name: string): string

getMeta

  • getMeta<K>(key: Exclude<K, keyof ICustomBaseObjectMeta>): unknown
  • getMeta<K>(key: K): ICustomBaseObjectMeta[K] | undefined
  • getMeta<V>(key: string): V | undefined

getMetaDataKeys

  • getMetaDataKeys(): readonly string[]

getProperty

  • getProperty(name: string): string
  • Parameters

    • name: string

    Returns string

getPropertyAbsoluteValue

  • getPropertyAbsoluteValue(name: string): number

getPseudoClassList

  • getPseudoClassList(): readonly string[]

getSyncedMeta

  • getSyncedMeta<K>(key: Exclude<K, keyof ICustomBaseObjectSyncedMeta>): unknown
  • getSyncedMeta<K>(key: K): ICustomBaseObjectSyncedMeta[K] | undefined
  • getSyncedMeta<V>(key: string): V | undefined

getSyncedMetaKeys

  • getSyncedMetaKeys(): readonly string[]

hasAttribute

  • hasAttribute(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

hasClass

  • hasClass(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

hasLocalProperty

  • hasLocalProperty(name: string): boolean

hasMeta

  • hasMeta(key: string): boolean
  • hasMeta<K>(key: K): boolean

hasProperty

  • hasProperty(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

hasPseudoClass

  • hasPseudoClass(name: string): boolean

hasSyncedMeta

  • hasSyncedMeta(key: string): boolean
  • hasSyncedMeta<K>(key: K): boolean
  • Determines whether contains the specified key.

    Parameters

    • key: string

      The key of the value to locate.

    Returns boolean

    True if the meta table contains any data at the specified key or False if not

  • Type parameters

    Parameters

    • key: K

    Returns boolean

hide

  • hide(): void
  • Returns void

insertBefore

isPointWithinElement

  • isPointWithinElement(point: IVector2): boolean

off

  • off(eventName: string, func: (...args: any[]) => void): void
  • Parameters

    • eventName: string
    • func: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

on

  • on(eventName: string, func: (senderElement: RmlElement, ...args: any[]) => void): void
  • Parameters

    • eventName: string
    • func: (senderElement: RmlElement, ...args: any[]) => void
        • (senderElement: RmlElement, ...args: any[]): void
        • Parameters

          Returns void

    Returns void

querySelector

  • querySelector(selector: string): RmlElement | null

querySelectorAll

  • querySelectorAll(selector: string): readonly RmlElement[]

removeAttribute

  • removeAttribute(name: string): boolean

removeChild

removeClass

  • removeClass(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

removeProperty

  • removeProperty(name: string): boolean

removePseudoClass

  • removePseudoClass(name: string): boolean

replaceChild

scrollIntoView

  • scrollIntoView(alignToTop?: boolean): void
  • Parameters

    • Optional alignToTop: boolean

    Returns void

setAttribute

  • setAttribute(name: string, value: string): void
  • Parameters

    • name: string
    • value: string

    Returns void

setMeta

  • setMeta<K>(key: K, value: shared.InterfaceValueByKey<ICustomBaseObjectMeta, K>): void
  • setMeta<K>(key: K, value: ICustomBaseObjectMeta[K]): void
  • setMeta<V, K>(key: K, value: shared.InterfaceValueByKey<ICustomBaseObjectMeta, K, V>): void

setOffset

setProperty

  • setProperty(name: string, value: string): boolean
  • Parameters

    • name: string
    • value: string

    Returns boolean

show

  • show(isModal?: boolean, focused?: boolean): void
  • Parameters

    • Optional isModal: boolean
    • Optional focused: boolean

    Returns void

update

  • update(): void
  • Returns void

Static getByID

  • Retrieves the rmldocument from the pool.

    Parameters

    • id: number

      The id of the rmldocument.

    Returns RmlDocument | null

    Entity if it was found, otherwise null.

Static getByRemoteID