           @toLanguage.selectedIndex = i
     )
 
+  onClosed: (callback) -> @emitter.on("Closed", callback)
+
   destroy: ->
+    @emitter.dispose()
     @decoration?.destroy()
     @marker?.destroy()
     @element?.remove()

  toLanguage: null
  closeIcon: null
  content: null

  @initializeTemplates: (viewTemplateGenerated) ->
    if TranslatorPlusDictionaryView.viewTemplate?

loophole = null
allowUnsafeEval = null
allowUnsafeNewFunction = null
Emitter = null

module.exports =
class TranslatorPlusDictionaryView
