This AI is still in early stages of development.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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
}
Checking a specific state
// always use strict equality checks
if (Define.stateOf("orderDroidStatsLoc") === Define.REMOVED) {
	// we can still get to it...
	native.orderDroidStatsLoc; // the native funciton
	// but we should really be using...
	orderDroidBuild; // its replacement
}
Availability STABLE

Requires:

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 API DiagnosticsDiagnostic routines for Define API...
  • Define ScriptsA library of ready made scripts for the Define API...

 

  • No labels