Commit 749b53ec authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Rendering parameter docs for events too.

parent 0b8d14f4
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -9,11 +9,21 @@ module JsDuck
      @column_title = "Event"
      @row_class = "method-row"
      @short_params = ShortParams.new
      @long_params = LongParams.new(@cls)
    end

    def signature_suffix(item)
      " : " + @short_params.render(item[:params])
    end

    def extra_doc(item)
      [
        "<div class='mdetail-params'>",
        "<strong style='font-weight: normal;'>Listeners will be called with the following arguments:</strong>",
        @long_params.render(item[:params]),
        "</div>"
      ].join("\n")
    end
  end

end