<commit_before>define([
	"intern!object",
	"intern/chai!assert",
	"../register",
	"dojo/sniff",
	"dui/Widget",
	"dojo/domReady!"
], function (registerSuite, assert, register, has, Widget) {
	var container, html;
	/*jshint multistr: true */
	html = '<my-widget-on id="myWidget" onclick="globalClicked++;" oncustom="globalCustom++;">hi</my-widget-on>';

	registerSuite({
		name: "dui/Widget-on",
		setup: function () {
			container = document.createElement("div");
			document.body.appendChild(container);
			container.innerHTML = html;
		},
		"declarative" : function () {
			// Test that declarative instantiation (onfoo=...) works,
			// and also that widget.on() works.

			// Define a widget that emits two events, "click" and "custom".
			// You can catch the events via either on("click", ...) or oncustom=... syntax.
			// Note that the HTMLElement prototype already defines onclick() so we don't need to.
			MyWidget = register("my-widget-on", [HTMLElement, Widget], {
				emitCustomEvent: function () {
					this.emit("custom");
				},
				emitClickEvent: function () {
					this.emit("click");
				},
				oncustom: function () {
					// summary:
					//		User can set oncustom=... rather than using on("custom", ...)
				}
			});
<commit_msg>remove unused modules<commit_after>define([
	"intern!object",
	"intern/chai!assert",
	"../register",
	"dui/Widget"
], function (registerSuite, assert, register, Widget) {
	var container, html;
	/*jshint multistr: true */
	html = '<my-widget-on id="myWidget" onclick="globalClicked++;" oncustom="globalCustom++;">hi</my-widget-on>';

	registerSuite({
		name: "dui/Widget-on",
		setup: function () {
			container = document.createElement("div");
			document.body.appendChild(container);
			container.innerHTML = html;
		},
		"declarative" : function () {
			// Test that declarative instantiation (onfoo=...) works,
			// and also that widget.on() works.

			// Define a widget that emits two events, "click" and "custom".
			// You can catch the events via either on("click", ...) or oncustom=... syntax.
			// Note that the HTMLElement prototype already defines onclick() so we don't need to.
			MyWidget = register("my-widget-on", [HTMLElement, Widget], {
				emitCustomEvent: function () {
					this.emit("custom");
				},
				emitClickEvent: function () {
					this.emit("click");
				},
				oncustom: function () {
					// summary:
					//		User can set oncustom=... rather than using on("custom", ...)
				}
			});

{'fraction_non_alphanumeric': 0.1707810602994739, 'fraction_numerical': 0.0, 'mean_word_length': 3.3216783216783217, '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': '7177168', 'n_tokens_mistral': 883, 'n_tokens_neox': 766, 'n_words': 203}