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 Current »

Overview

Backport allows you to quickly add missing constants to the JS API.

(info) If the constant already exists, it will not be altered.

Availability

Backport.js v0.1 and above.

Syntax

// add constant if missing
var returnValue = backport(name,value); // value must be a string, number or boolean

Parameters

ParameterTypeMandatoryDescriptionBackport version
nameString(tick)The name of the constant as a string (in quotes).0.1
value

Number

String

Boolean

(tick)

The value of the constant.

It must be a number, string or boolean value.

0.1

Return value

ValueTypeDescriptionBackport verison
<status>VariantThe new status of the constant (see status return values).0.1

Examples

See the source code of these backport scripts for great examples:

See also

  • to follow
  • No labels