Namespace: EventTargetMixin

Oracle® JavaScript Extension Toolkit (JET)
15.1.0

F83698-01

Since:
  • 11.0.0
Module:
  • ojeventtarget

QuickNav

Description

Mixin class to provide generic implementation of addEventListener and removeEventListener methods for the DataGridProvider interface.

This class cannot be instantiated. You can only call the static applyMixin method to add the implementation to another class.


Usage

Typescript Import Format
//To import this namespace, use the format below.
import {EventTargetMixin} from "ojs/ojeventtarget";

For additional information visit:


Methods

(static) applyMixin(derivedCtor) : {void}

Apply this mixin to another class
Parameters:
Name Type Description
derivedCtor function the constructor of an existing class
Since:
  • 11.0.0
Returns:
Type
void
Examples

Apply the mixin in Typescript:

class CustomDataGridProvider<D> implements DataGridProvider<D> {
  // Add a stand-in property to satisfy the compiler
  addEventListener: () => void;
  removeEventListener: () => void;

  constructor() {
    // Constructor implementation
  }
}

EventTargetMixin.applyMixin(CustomDataGridProvider);

Apply the mixin in Javascript:

function CustomDataGridProvider() {
  // Constructor implementation
}

EventTargetMixin.applyMixin(CustomDataGridProvider);