<commit_before>/**
 * enyo.Spotlight.Util definition
 * @author: <NAME>
 */

enyo.Spotlight.Util = new function() {
	this.dispatchEvent = function(sEvent, oData, oControl) {
		if (!oControl || oControl.destroyed) { return; }
		
		if (enyo.Spotlight.isFrozen()) {
			if (sEvent == 'onSpotlightBlur' || sEvent == 'onSpotlightPoint') { return; }
			oControl = enyo.Spotlight.getCurrent();
		}
		
		oData            = oData ? (enyo.clone(oData) || {}) : {};
		oData.type       = sEvent;
		oData.originator = oControl;
		oData.originator.timestamp = oData.timeStamp;
		oData.target     = oControl.hasNode();
		oData.customEvent = (oData.customEvent === undefined) ? true : oData.customEvent;

		return enyo.dispatcher.dispatch(oData);<commit_msg>Workaround for apparent JSCore bug in webOS (GF-55374, GF-53973).<commit_after>/**
 * enyo.Spotlight.Util definition
 * @author: <NAME>
 */

enyo.Spotlight.Util = new function() {
	this.dispatchEvent = function(sEvent, oInData, oControl) {
		var oData;

		if (!oControl || oControl.destroyed) { return; }
		
		if (enyo.Spotlight.isFrozen()) {
			if (sEvent == 'onSpotlightBlur' || sEvent == 'onSpotlightPoint') { return; }
			oControl = enyo.Spotlight.getCurrent();
		}
		
		if (oInData) {
			oData = enyo.clone(oInData);
		} else {
			oData = {};
		}

		oData.type       = sEvent;
		oData.originator = oControl;
		oData.originator.timestamp = oData.timeStamp;
		oData.target     = oControl.hasNode();
		oData.customEvent = (oData.customEvent === undefined) ? true : oData.customEvent;

		return enyo.dispatcher.dispatch(oData);
{'fraction_non_alphanumeric': 0.15232632249840664, 'fraction_numerical': 0.006373486297004461, 'mean_word_length': 3.631268436578171, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6501761', 'n_tokens_mistral': 621, 'n_tokens_neox': 554, 'n_words': 100}