Skip to main content
Branch: Development

RmlDocument

Hierarchy

  • RmlElement
    • RmlDocument

Index

Constructors

constructor

  • new RmlDocument(url: string): RmlDocument

Properties

publicreadonlyabsoluteLeft

absoluteLeft: number

publicreadonlyabsoluteOffset

absoluteOffset: Vector2

publicreadonlyabsoluteTop

absoluteTop: number

publicreadonlybaseline

baseline: number

publicreadonlybody

body: RmlElement

publicreadonlychildCount

childCount: number

publicreadonlychildNodes

childNodes: readonly RmlElement[]

publicreadonlyclientHeight

clientHeight: number

publicreadonlyclientLeft

clientLeft: number

publicreadonlyclientTop

clientTop: number

publicreadonlyclientWidth

clientWidth: number

publicreadonlycontainingBlock

containingBlock: Vector2

publicreadonlyfirstChild

firstChild: null | RmlElement

publicreadonlyfocusedElement

focusedElement: null | RmlElement

publicreadonlyhasChildren

hasChildren: boolean

publicreadonlyid

id: number

publicinnerRML

innerRML: string

publicreadonlyisModal

isModal: boolean

publicreadonlyisOwned

isOwned: boolean

publicreadonlyisRemote

isRemote: boolean

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

publicreadonlyisVisible

isVisible: boolean

publicreadonlylastChild

lastChild: null | RmlElement

publicreadonlynextSibling

nextSibling: null | RmlElement

publicreadonlyoffsetHeight

offsetHeight: number

publicreadonlyoffsetLeft

offsetLeft: number

publicreadonlyoffsetTop

offsetTop: number

publicreadonlyoffsetWidth

offsetWidth: number

publicreadonlyownerDocument

ownerDocument: RmlDocument

publicreadonlyparent

parent: null | RmlElement

publicreadonlypreviousSibling

previousSibling: null | RmlElement

publicreadonlyrefCount

refCount: number

Returns the ref count of the entity.

Remarks

It’s only available in debug-mode.

publicreadonlyrelativeOffset

relativeOffset: Vector2

publicreadonlyremoteID

remoteID: number

The serverside id of this entity.

publicrmlId

rmlId: string

publicreadonlyscrollHeight

scrollHeight: number

publicscrollLeft

scrollLeft: number

publicscrollTop

scrollTop: number

publicreadonlyscrollWidth

scrollWidth: number

publicreadonlysourceUrl

sourceUrl: string

publicstyle

style: Record<string, string>

publicreadonlytagName

tagName: string

publictitle

title: string

publicreadonlytype

type: BaseObjectType

Type of the object.

publicreadonlyvalid

valid: boolean

Object usability.

Returns

False if object is no longer usable.

publicreadonlyzIndex

zIndex: number

Methods

publicaddClass

  • addClass(name: string): boolean

publicaddPseudoClass

  • addPseudoClass(name: string): boolean

publicappendChild

  • appendChild(child: RmlElement): void

publicblur

  • blur(): void

publicclick

  • click(): void

publicclosest

  • closest(selectors: string): null | RmlElement

publiccreateElement

  • createElement(tag: string): RmlElement

publiccreateTextNode

  • createTextNode(text: string): RmlElement

publicdeleteMeta

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

publicdestroy

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

publicfocus

  • focus(): boolean

publicgetAttribute

  • getAttribute(name: string): string

publicgetAttributes

  • getAttributes(): Record<string, string>

publicgetClassList

  • getClassList(): readonly string[]

publicgetElementByID

  • getElementByID(id: string): null | RmlElement

publicgetElementsByClassName

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

publicgetElementsByTagName

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

publicgetEventListeners

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

publicgetLocalProperty

  • getLocalProperty(name: string): string

publicgetMeta

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

    • K: string

publicgetMetaDataKeys

  • getMetaDataKeys(): readonly string[]

publicgetProperty

  • getProperty(name: string): string

publicgetPropertyAbsoluteValue

  • getPropertyAbsoluteValue(name: string): number

publicgetPseudoClassList

  • getPseudoClassList(): readonly string[]

publicgetSyncedMeta

  • getSyncedMeta<K>(key: Exclude<K, never>): unknown
  • getSyncedMeta<K>(key: K): undefined | ICustomBaseObjectSyncedMeta[K]
  • getSyncedMeta<V>(key: string): undefined | V
  • Gets a value using the specified key.


    Type parameters

    • K: string

publicgetSyncedMetaKeys

  • getSyncedMetaKeys(): readonly string[]

publichasAttribute

  • hasAttribute(name: string): boolean

publichasClass

  • hasClass(name: string): boolean

publichasLocalProperty

  • hasLocalProperty(name: string): boolean

publichasMeta

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

publichasProperty

  • hasProperty(name: string): boolean

publichasPseudoClass

  • hasPseudoClass(name: string): boolean

publichasSyncedMeta

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

publichide

  • hide(): void

publicinsertBefore

  • insertBefore(child: RmlElement, adjacent: RmlElement): void

publicisPointWithinElement

  • isPointWithinElement(point: IVector2): boolean

publicoff

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

publicon

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

publicquerySelector

  • querySelector(selector: string): null | RmlElement

publicquerySelectorAll

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

publicremoveAttribute

  • removeAttribute(name: string): boolean

publicremoveChild

  • removeChild(child: RmlElement): void

publicremoveClass

  • removeClass(name: string): boolean

publicremoveProperty

  • removeProperty(name: string): boolean

publicremovePseudoClass

  • removePseudoClass(name: string): boolean

publicreplaceChild

  • replaceChild(newElem: RmlElement, oldElem: RmlElement): void

publicscrollIntoView

  • scrollIntoView(alignToTop?: boolean): void

publicsetAttribute

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

publicsetMeta

  • setMeta<K>(key: K, value: InterfaceValueByKey<ICustomBaseObjectMeta, K, unknown, void>): void
  • setMeta<K>(key: K, value: ICustomBaseObjectMeta[K]): void
  • setMeta<V, K>(key: K, value: InterfaceValueByKey<ICustomBaseObjectMeta, K, V, void>): void
  • Type parameters

    • K: string

publicsetOffset

  • setOffset(element: RmlElement, offset: IVector2, fixed?: boolean): void

publicsetProperty

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

publicshow

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

publicupdate

  • update(): void

publicstaticgetByID

  • getByID(id: number): null | RmlDocument
  • Retrieves the rmldocument from the pool.

publicstaticgetByRemoteID

  • getByRemoteID(type: BaseObjectType, id: number): null | BaseObject