Isolate all JavaScript into a special-case class.