/**
 * Created by rockyl on 2019-11-16.
 */

const eventName = engine.findVariable('eventName', args, props);
const data = engine.findVariable('data', args, props);
const useCapture = engine.findVariable('useCapture', args, props);
const isGlobal = engine.findVariable('isGlobal', args, props);

if(eventName){
	let sender = isGlobal ? engine.globalEvent : target;
	sender.dispatchEvent(eventName, data, useCapture);
}

next('success', args);
