Current mode:
Alpine CSP build — no unsafe-eval required. Check console for violations.
Basic Alpine expressions using the CSP build. Should work without unsafe-eval.
htmx loads a partial, Alpine reacts to the new content.
htmx reads Alpine component state via hx-vals js:. Requires safeEval:true.
The Alpine CSP build blocks global access entirely — console, window
etc. throw "Undefined variable" Alpine errors (check console). Extract logic to
Alpine.data() in a nonced <script> tag instead.
The Alpine CSP build actively blocks its own dangerous sinks before they reach the DOM —
no TT violation needed. These throw Alpine's own errors, not browser TT errors.
This means trusted-types htmx alone is sufficient alongside the Alpine CSP build.
x-html — Alpine CSP throws "Using the x-html directive is prohibited"
x-init + insertAdjacentHTML — Alpine CSP throws "Accessing insertAdjacentHTML is prohibited"
x-if / x-for — Alpine CSP handles template cloning internally without hitting TT sinks
x-if rendered ✓
x-bind:innerHTML — Alpine CSP blocks this too