Mixins

EventTarget()

new EventTarget()

EventTarget is a class that can have the same API as the DOM EventTarget. It
adds shorthand functions that wrap around lengthy functions. For example:
the on function is a wrapper around addEventListener.

Parameters:

one(type, fn)

This function will add an event listener that gets triggered only once. After the
first trigger it will get removed. This is like adding an event listener
with EventTarget#on that calls EventTarget#off on itself.