Your control name should match that defined in your C++ component's WCCcontrol structure.
- Has no content, other than the client element.
- Contains the Omnis properties which pertain to the container of the control, e.g. its border.
Initially has its content set to that specified in the innerHTML() method of the C++ component.
- Should contain the entire control structure.
You should only ever add child elements to the Client element (or its children), never to the Frame element.
The standard way that we create a JS control is by creating a constructor function for the control (generally at the bottom of the file), and then create an Immediately Invoked Function Expression (IIFE) which creates the prototype for the control.
The following gives a brief example of the structure:
Your control must also implement the following methods:
You will probably want to implement more Control Methods than these, and there are several optional ones available.
The most-used of these are already provided as stubs in the generic.js file, included in the SDK, so this is always a good starting point from which you can extend the functionality of your own control.