Document
Represents the root node of the Element tree. This is the VguiJavascriptContext panel or a subclass.
Member Summary
Public Members | ||
public get |
parentNode: * |
Method Summary
Public Methods | ||
public |
Opens the Vgui Editor for this panel |
|
public |
dispatchEvent(e: *): boolean |
|
public |
getElementById(id: string): * Looks recursively in child elements to find an Element that has an matching id. |
|
public |
Plays a sound effect. |
|
public |
registerBind(key: string, type: string) Registers a binding with the client. |
|
public |
|
Inherited Summary
From class Node | ||
public get |
childNodes: * Returns the children of this node |
|
public get |
parentNode: * Returns a Node that is the parent of this node. |
|
public |
toString(): * Returns a string representation of the Node |
From class Element | ||
public get |
id: * Returns the fieldName of the element |
|
public |
addEventListener(type: *, listener: *) Adds a listener to a type of events See Event for subclasses for supported types |
|
public |
dispatchEvent(event: *): * Dispatch an event on this element. |
|
public |
getAttribute(name: *): * Gets an attribute on the element In order to support a new attribute an overloading class needs to add the setting type to _attrHandler |
|
public |
removeEventListener(type: *, listener: *) Removes a registered event listener |
|
public |
setAttribute(name: *, value: *) Sets an attribute on the element In order to support a new attribute an overloading class needs to add the setting type to _attrHandler |
|
public |
startAnimation(animationName: string): bool Starts a VGUI animation on child elements. |
Public Members
Public Methods
public dispatchEvent(e: *): boolean source
Override:
Element#dispatchEventParams:
Name | Type | Attribute | Description |
e | * |
public getElementById(id: string): * source
Looks recursively in child elements to find an Element that has an matching id.
Params:
Name | Type | Attribute | Description |
id | string |
|
The id to look for |
Return:
* |
public playSound(soundName: string) source
Plays a sound effect. soundName be defined in the empires soundscripts.
Params:
Name | Type | Attribute | Description |
soundName | string | The key of the sound in the soundscript to play. |
public registerBind(key: string, type: string) source
Registers a binding with the client. This should trigger an immediate SettingsEvent on Document so register a listener before registering.