Documentation

BX.namespace

object BX.namespace(
 string namespace
)

Creates a namespace in the BX global object. If the namespace already exists, the function does has no effect.

Function parameters

Parameter Description
namespace Name of the created namespace.

Returned value

Returns a link to the last namespace chain element.

Examples of use

BX.namespace("MyCompany.Module.NewsForm");
Creates a MyCompany  object in the BX global scope as follows:

BX.MyCompany = {
    Module: {
        NewsForm: {
        }
    }
}
© «Bitrix24», 2001-2024
Up