1.2.2.1Alternative, class-based framework access in widgets

For consistency across widgets, scripts, and UDIXes, this document refers to widgets having access to the framework by creating a new FXB.Framework() object: var Framework = new FXB.Framework();

However, there is also class-based syntax which you can use if you prefer. For example:

// Define a class for your widget which inherits from FXB.Framework

class MyWidget extends FXB.Framework

{

OnLoad()

{

}

etc.

}

// Create an instance of the class to service the web page

var widget = new MyWidget();

Within the class members, you can then refer to framework properties and methods using this. For example, this.SendOrder() instead of Framework.SendOrder().