code: public function replaceJS($js)
      {
          if (is_array($js)) {
              $this->js = array();
              return $this->addJS($js);
          } else {
              throw new InternalException("JS files to add is not an array");
          }
      }
docs: /*
  Public: Replace js files