Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

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

Code Block
themeRDark
languagejavascript
titleChecking a specific state
linenumberstrue
// always use strict equality checks
if (Define.stateOf("chat") === Define.REMOVED) {
	// chat function was native, but has since been removed by a sript
}
Code Block
themeRDark
languagejavascript
titleChecking a specific stateAccessing removed properties...
linenumberstrue
// 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
}
Div
classbox
Availability
Status
colourGreen
titleStable

Requires:

Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

Define API

Topics:

Child pages (Children Display)
alltrue
depthall
pageDefine API
excerpttrue