Static Functions
12 Sep 20254 minutes to read
Root static functions of Base Library
enableRipple
Animation Module provides support to enable ripple effect functionality to Essential JS 2 components.
| Parameter | Type | Description |
|---|---|---|
| isRipple | boolean |
Specifies the boolean value to enable or disable ripple effect. |
Returns boolean
setGlobalAnimation
This method is used to enable or disable the animation for all components.
| Parameter | Type | Description |
|---|---|---|
| value |
string | GlobalAnimationMode
|
Specifies the value to enable or disable the animation for all components. When set to ‘enable’, it enables the animation for all components, regardless of the individual component’s animation settings. When set to ‘disable’, it disables the animation for all components, regardless of the individual component’s animation settings. |
Returns void
getComponent
Global function to get the component instance from the rendered element.
| Parameter | Type | Description |
|---|---|---|
| elem |
HTMLElement | string
|
Specifies the HTMLElement or element id string. |
| comp |
string | any | T
|
Specifies the component module name or Component. |
Returns T
enableVersionBasedPersistence
To enable or disable version based statePersistence functionality for all components globally.
| Parameter | Type | Description |
|---|---|---|
| status | boolean |
Optional argument Specifies the status value to enable or disable versionBasedStatePersistence option. |
Returns void
updateCSSText
Updates the CSS text of an element by merging new styles with existing styles.
| Parameter | Type | Description |
|---|---|---|
| element | HTMLElement |
The element whose styles need to be updated. |
| cssText | string |
The new CSS styles to be added or updated. |
Returns void
enableRtl
To enable or disable RTL functionality for all components globally.
| Parameter | Type | Description |
|---|---|---|
| status | boolean |
Optional argument Specifies the status value to enable or disable rtl option. |
Returns void
loadCldr
Load the CLDR data into context
| Parameter | Type | Description |
|---|---|---|
| data | Object[] |
Specifies the CLDR data’s to be used for formatting and parser. |
Returns void
setCulture
Set the default culture to all EJ2 components
| Parameter | Type | Description |
|---|---|---|
| cultureName | string |
Specifies the culture name to be set as default culture. |
Returns void
setCurrencyCode
Set the default currency code to all EJ2 components
| Parameter | Type | Description |
|---|---|---|
| currencyCode | string |
Specifies the culture name to be set as default culture. |
Returns void
registerLicense
To set license key.
| Parameter | Type | Description |
|---|---|---|
| key | string |
license key |
Returns void