Function overrideMethod

  • Return a wrapped handler method, that provides this._super and this._superApply.

     // Implement `opts.createNode` event to add the 'draggable' attribute
    overrideMethod(ctx.options, "createNode", (event, data) => {
    // Default processing if any
    this._super.apply(this, event, data);
    // Add 'draggable' attribute
    data.node.span.draggable = true;
    });

    Parameters

    • instance: any
    • methodName: string
    • handler: FunctionType
    • Optional ctx: any

    Returns void