registerEvents(targetNode, synevent, events) {
		const dispatchFn = L.bind((ev) => {
			this.node.dispatchEvent(new CustomEvent(synevent, { bubbles: true }));
		}, this);

		for (let i = 0; i < events.length; i++)
			targetNode.addEventListener(events[i], dispatchFn);
	}
Dispatch a custom (synthetic) event in response to received events.

Sets up event handlers on the given target DOM node for the given event
names that dispatch a custom event of the given type to the widget root
DOM node.

The primary purpose of this function is to set up a series of custom
uniform standard events such as `widget-update`, `validation-success`,
`validation-failure` etc. which are triggered by various different
widget specific native DOM events.

@instance
@memberof LuCI.ui.AbstractElement
@param {Node} targetNode
Specifies the DOM node on which the native event listeners should be
registered.

@param {string} synevent
The name of the custom event to dispatch to the widget root DOM node.

@param {string[]} events
The native DOM events for which event handlers should be registered.