This AI is still in early stages of development.
Define.REMOVED
- Aubergine
Owned by Aubergine
Indicates a native global was removed...
Notes
A define with state Define.REMOVED was originally a native but has since been removed by a script.
Removed defines are immutable. This state is mainly used to remove deprecated JS API features, causing errors in your scripts should you still be using them (so you can detect where you need to update your code).
You can still access removed properties by prefixing them with Native (see example).
Note: If you remove something that doesn't exist, nothing will happen. The property name will have a state of Define.MISSING.
Examples
Checking a specific state
// always use strict equality checks if (Define.stateOf("chat") === Define.REMOVED) { // chat function was native, but has since been removed by a sript } // if you try accessing it, you get an error chat(ALLIES, "Anyone there?"); // Error
Accessing removed properties...
// always use strict equality checks if (Define.stateOf("orderDroidStatsLoc") === Define.REMOVED) { // we can still get to it... native.orderDroidStatsLoc; // the native function // but we should really be using... orderDroidBuild; // its replacement }
Contents
Jump to:
Define API
Topics:
- Define() — Add, remove or redefine a property on the global scope, overriding any native property of the same name on the global object...
- Define.has() — Check for presence of a global property...
- Define.RESERVED — A reserved keyword (a native that cannot be changed)...
- Define.stateOf() — Check state of a specific global property...
- Define.hasNative() — Check for presence of a native global property...
- Define.REMOVED — Indicates a native global was removed...
- Define.MISSING — Indicates a global is not present (missing).
- Define.NATIVE — Indicates a global was defined prior to including the Define API.
- Define.REPLACED — Indicates a global was replaced by a script using the Define API.
- Define.ADDED — Indicates a global was added by a script using the Define API.
- Define API Diagnostics — Diagnostic routines for Define API...
- Define Scripts — A library of ready made scripts for the Define API...