<commit_before>/*
---

name: Event.CSS3

description: Provides CSS3 events.

license: MIT-style license.

authors:
	- <NAME> (<EMAIL>)

requires:
	- Custom-Event/Element.defineCustomEvent

provides:
	- Event.CSS3

...
*/

(function() {

// TODO: Property detect if a prefix-less version is available

var a = '';
var t = '';

if (Browser.safari || Browser.chrome || Browser.platform.ios) {
	a = 'webkitAnimationEnd';
	t = 'webkitTransitionEnd';
} else if (Browser.firefox) {
	a = 'animationend';
	t = 'transitionend';
} else if (Browser.opera) {
	a = 'oAnimationEnd';
	t = 'oTransitionEnd';
} else if (Browser.ie) {
	a = 'msAnimationEnd';
	t = 'msTransitionEnd';
}

Element.NativeEvents[a] = 2;
Element.NativeEvents[t] = 2;
Element.Events['transitionend'] = { base: t, onAdd: function(){}, onRemove: function(){} };
Element.Events['animationend'] = { base: a, onAdd: function(){}, onRemove: function(){} };

Element.defineCustomEvent('owntransitionend', {
	base: 'transitionend',
	condition: function(e) {
		e.stop();
		return e.target === this;
	}
});

Element.defineCustomEvent('ownanimationend', {
	base: 'animationend',
	condition: function(e) {
		e.stop();
		return e.target === this;
	}
})

})();
<commit_msg>Fix an issue with prefixing animationend and transitionend<commit_after>/*
---

name: Event.CSS3

description: Provides CSS3 events.

license: MIT-style license.

authors:
	- <NAME> (<EMAIL>)

requires:
	- Custom-Event/Element.defineCustomEvent

provides:
	- Event.CSS3

...
*/

(function() {

// TODO: Property detect if a prefix-less version is available

var a = 'animationend';
var t = 'transitionend';

Element.NativeEvents[a] = 2;
Element.NativeEvents[t] = 2;
Element.Events['transitionend'] = { base: t, onAdd: function(){}, onRemove: function(){} };
Element.Events['animationend'] = { base: a, onAdd: function(){}, onRemove: function(){} };

Element.defineCustomEvent('owntransitionend', {
	base: 'transitionend',
	condition: function(e) {
		e.stop();
		return e.target === this;
	}
});

Element.defineCustomEvent('ownanimationend', {
	base: 'animationend',
	condition: function(e) {
		e.stop();
		return e.target === this;
	}
})

})();

{'fraction_non_alphanumeric': 0.17916666666666667, 'fraction_numerical': 0.004629629629629629, 'mean_word_length': 4.4987277353689565, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6463956', 'n_tokens_mistral': 762, 'n_tokens_neox': 739, 'n_words': 172}