Permalink
Browse files

Add comments about Call and JsFunc.

  • Loading branch information...
1 parent eeacfbb commit 5dc3c125eda19144d6f5360273d7336df7ef03fc @pr1001 pr1001 committed Mar 14, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 web/webkit/src/main/scala/net/liftweb/http/js/JsCommands.scala
@@ -410,6 +410,9 @@ object JE {
/**
* A JavaScript method that takes parameters
+ *
+ * JsFunc is very similar to Call but only the latter will be implicitly converted to a JsCmd.
+ * @see Call
*/
case class JsFunc(method: String, params: JsExp*) extends JsMember {
def toJsCmd = params.map(_.toJsCmd).mkString(method + "(", ", ", ")")
@@ -465,6 +468,12 @@ object JE {
def toJsCmd = "true"
}
+ /**
+ * A JavaScript method that takes parameters
+ *
+ * Call is very similar to JsFunc but only the former will be implicitly converted to a JsCmd.
+ * @see JsFunc
+ */
case class Call(function: String, params: JsExp*) extends JsExp {
def toJsCmd = function + "(" + params.map(_.toJsCmd).mkString(",") + ")"
}

0 comments on commit 5dc3c12

Please sign in to comment.