<commit_before>define([
	'matreshka_dir/core/var/core',
	'matreshka_dir/core/var/sym',
	'matreshka_dir/core/util/common',
	'matreshka_dir/core/var/domevtreg'
], function(core, sym, utils, domEvtReg) {
	"use strict";

	var triggerDOMEvent = function(el, name, args) {
		var doc = document,
			event;

		if(doc.createEvent) {
			event = doc.createEvent('Event');
			event.initEvent(name, true, true);
			event.mkArgs = args;
			el.dispatchEvent(event);
		} else if(typeof Event != 'undefined' && !el.fireEvent) {
			event = new Event(name, {
				bubbles: true,
    			cancelable: true
			});
			event.mkArgs = args;
			el.dispatchEvent(event);
		} else if(el.fireEvent) {
			event = doc.createEventObject();
			event.mkArgs = args;
			el.fireEvent('on' + name, event);
		} else {
			throw Error('Cannot trigger DOM event');
		}

		return event;
	};

	core.trigger = function(object, names) {
		var allEvents = object && typeof object == 'object' && object[sym] && object[sym].events,
			args, i, j, l, events, ev, name, executed, nodes, _nodes;

		if (names && allEvents) {
			args = utils.toArray(arguments, 2);
			names = names.split(/\s/);

			for (i = 0; i < names.length; i++) {
				name = names[i];
				if(~name.indexOf('::')) {
					executed = domEvtReg.exec(name);
					nodes = object[sym].special[executed[3] || 'sandbox'];
					nodes = nodes && nodes.$nodes;
					_nodes = core.$();
					if(executed[5]) {
						for(j = 0; j < nodes.length; j++) {
							_nodes = _nodes.add(nodes.find(executed[5]));
						}
					} else {
						_nodes = nodes;
					}

					for(j = 0; j < _nodes.length; j++) {
						triggerDOMEvent(_nodes[i], executed[1], args);
					}

					// core._addDOMListener(object, executed[3] || 'sandbox', executed[1], executed[5], callback, ctx, _evtData);
				} else {
					events = allEvents[name];<commit_msg>minor<commit_after>define([
	'matreshka_dir/core/var/core',
	'matreshka_dir/core/var/sym',
	'matreshka_dir/core/util/common',
	'matreshka_dir/core/var/domevtreg'
], function(core, sym, utils, domEvtReg) {
	"use strict";

	var triggerDOMEvent = function(el, name, args) {
		var doc = document,
			event;

		if(doc.createEvent) {
			event = doc.createEvent('Event');
			event.initEvent(name, true, true);
			event.mkArgs = args;
			el.dispatchEvent(event);
		} else if(typeof Event != 'undefined' && !el.fireEvent) {
			event = new Event(name, {
				bubbles: true,
    			cancelable: true
			});
			event.mkArgs = args;
			el.dispatchEvent(event);
		} else if(el.fireEvent) {
			event = doc.createEventObject();
			event.mkArgs = args;
			el.fireEvent('on' + name, event);
		} else {
			throw Error('Cannot trigger DOM event');
		}

		return event;
	};

	core.trigger = function(object, names) {
		var allEvents = object && typeof object == 'object' && object[sym] && object[sym].events,
			args, i, j, l, events, ev, name, executed, nodes, _nodes, selector;

		if (names && allEvents) {
			args = utils.toArray(arguments, 2);
			names = names.split(/\s/);

			for (i = 0; i < names.length; i++) {
				name = names[i];
				if(~name.indexOf('::')) {
					executed = domEvtReg.exec(name);
					nodes = object[sym].special[executed[3] || 'sandbox'];
					nodes = nodes && nodes.$nodes;
					_nodes = core.$();
					selector = executed[5];
					if(selector) {
						for(j = 0; j < nodes.length; j++) {
							_nodes = _nodes.add(nodes.find(selector));
						}
					} else {
						_nodes = nodes;
					}

					for(j = 0; j < _nodes.length; j++) {
						triggerDOMEvent(_nodes[i], executed[1], args);
					}
				} else {
					events = allEvents[name];
{'fraction_non_alphanumeric': 0.17249091417388873, 'fraction_numerical': 0.005032149846239866, 'mean_word_length': 3.089142857142857, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4197282', 'n_tokens_mistral': 1550, 'n_tokens_neox': 1271, 'n_words': 272}