     @path = path
     @iframe.$().attr 'src', path
     @viewerHeader.setPath initialPath
+    @emit "ready"
 
   refreshIFrame:->
     @iframe.$().attr 'src', "#{@path}"

    @clean

  viewAppended:->
    @addSubView @viewerHeader = new ViewerTopBar {}, @path
    @addSubView @iframe = new KDCustomHTMLView
      tagName : 'iframe'

    {path} = @getOption 'params'
    if path then @utils.defer => @openPath path

class PreviewerView extends KDView

  constructor:(options = {},data)->

    options.cssClass = 'previewer-body'

    super options, data

  openPath:(path)->
