Class SsrProcessor

java.lang.Object
dev.vanengine.core.SsrProcessor

public class SsrProcessor extends Object
Server-side rendering processor for Van templates. Handles v-for, v-if/v-else-if/v-else, v-show, :class/:style/:attr bindings, and strips client-only directives (@click, v-model).

Processing is recursive: v-for expansion calls the full pipeline per iteration, so loop variables are in scope for inner v-if, :class, {{ }} etc.

Regions between <!--client-only--> and <!--/client-only--> are skipped (already handled by Rust compiler).

  • Constructor Details

    • SsrProcessor

      public SsrProcessor()
  • Method Details

    • processAll

      public String processAll(String html, Map<String,Object> scope)
      Process all SSR directives in the HTML with the given scope. This is the recursive entry point — v-for calls this per iteration.