Overview of Global Methods
A global method is a method of the global object.
A global variable is a member of a global object. To reference a global property, you do not need to use an object name. For example, to reference the Is NaN method that tests to determine if a value is equal to the special value NaN, you can use the format that this topic describes. For more information, see Is NaN Method.
The global methods that this book describes are unique to the Siebel eScript implementation of JavaScript. These methods are not part of the ECMAScript standard. Avoid using them in a script that you might use with a JavaScript interpreter that does not support them.
You can use format A or format B to call a global method.
Format A
globalMethod(value);
Format A treats the globalMethod argument as a function. You cannot use format A in a function that includes a local variable that has the same name as a global variable. To reference the global variable in this situation, you must use the global keyword.
global.globalMethod(value);
Format B treats the globalMethod argument as a method of the global object.
Arguments
The following table describes the arguments of a global object.
Argument | Description |
---|---|
globalMethod |
The method that the global object applies. |
value |
The value that the global object applies to the method that you specify in the globalMethod argument. |
Related Topics
For more information, see the following topics: