       else
         document.addEventListener event, handler
 
-# The `instances` of the various widgets, stored by widget type and then
-# mapped with their target DOM element as key.
-widgets.instances = {}
-
 #### widgets.define
 
 # The `widgets.define` is used to create a new widget usable through the

    Array::forEach.call elements, (element) ->
      return unless can_be_handled element

      res = widgets[name] element, Object.create(options), elements
      element.className += " #{handled_class}"
      instances.set element, res
      block?.call element, element, res



#
__widgets__ = {}

# The `__instances__` object stores the returned instances of the various widgets,
# stored by widget type and then mapped with their target DOM element as key.
__instances__ = {}

## widgets

# The `widgets` function is both the main module and the function
# used to register the widgets to apply on a page.
widgets = (name, selector, options={}, block) ->
  unless __widgets__[name]?
    throw new Error "Unable to find widget '#{name}'"

  # The options specific to the widget registration and activation are
