Skip to content
CCinder
Cinder.lastScan

API Reference

Cinder.lastScan

Read the most recent semantic scan result without running a new scan.

Use lastScan() when you want to inspect the latest semantic scan output without rescanning the DOM.

Example

ts
2 lines
await Cinder.scan(document);
console.log(Cinder.lastScan());

What it returns

lastScan() returns the current CinderSemanticScanResult.

That includes:

  • entries
  • warnings
  • summary
  • scannedAt

Why it is useful

Use it when you want to:

  • debug scan output quickly
  • compare scan state before and after UI updates
  • inspect mutation-driven rescans without forcing another manual scan

Important note

If no scan has run yet, the runtime returns its current empty scan result state.

Continue reading