# Dispatch custom path flags with FLAGS

> Execute custom flags, observe their events and distinguish them from model changes and reserved state flags.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 815919932ed4aa0297d3717cc646b3b3d35fba02bb5f9a3d3ac08c6ff1d6a72f
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: jcomponent20@3fedd009a277f50fddc608b97afbec553b67c51b
Review: not-recorded

`FLAGS('path @name', callback)` parses a jComponent path, emits `@flag name` with the parsed path and invokes the callback. Register the listener with `ON('@flag name', function(path) { ... })`. Multiple distinct custom flags emit separate events; repeating a name in the same expression emits it once. In this example, execution and the callback are synchronous.

The parsed path is the event argument. A value such as `@refresh:yes` still selects the flag named `refresh`; the value is not passed as a second event argument. Reserved flags such as `@reset` are excluded from these custom events. Calling `FLAGS()` alone does not call `SET()` or reset component state: state operations interpret their own flags. Use application-specific flag names to avoid collisions.

```html public/index.html
<!DOCTYPE html>
<html><head><meta charset="utf-8"><title>Custom flags</title>
<script src="//cdn.componentator.com/spa.min@20.js"></script></head>
<body><p>Dispatch a custom refresh notification without modifying the model.</p></body></html>
```
