For consistency across widgets, scripts, and UDIXes, this document refers to widgets having access to the framework by creating a new FXB.Framework() object:
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