Widget < TOptions > Generic Class

If a widget requires some additional initialization options, it might be derived from the Widget< TOptions > class.

The options passed to the constructor can be accessed in class methods through the protected field options.

  1. public abstract class Widget< TOptions > : Widget
  2. where TOptions: class, new()
  3. {
  4. protected Widget(jQueryObject element, TOptions opt = null) { ... }
  5. protected readonly TOptions options;
  6. }