All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.liftweb.javascript.JavaScriptContext.scala Maven / Gradle / Ivy

The newest version!
package net.liftweb.javascript

import net.liftweb.http.{TransientRequestVar, RequestVar, LiftRules}
import net.liftweb.util._
import Helpers._
import org.mozilla.javascript.{NativeJavaObject, ScriptableObject, Context}
import scala.xml.NodeSeq
import net.liftweb.actor.LAFuture
import net.liftweb.common._

/**
 * You can add a JavaScript context to Lift so that
 * you can run server-side JavaScript as part of Lift page
 * rendering.
 *
 * In Boot.scala, just do `JavaScriptContext.install()`
 * and you get a JavaScript execution context around
 * all HTTP requests.
 */
object JavaScriptContext {
  /**
   * Hook into LiftRules to put a JavaScript
   * execution loanwrapper around everything and
   * also slurp in