You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Decide whether Dispatch refuses names of standard DOM events #704
Should actions.Dispatch(name=...) refuse event names that the browser and Vue already use, such as click, submit or input?
What happens today
Dispatch.__post_init__ (packages/py/citry/citry/ext/events/actions.py:295) checks that the name is a non-empty string that does not start with citry:. The browser runtime then fires new CustomEvent(name, {detail}) at the component's first element (packages/py/citry/citry/_vue/client.js:4226), and the event bubbles. A name such as click therefore runs every click listener on that element and its ancestors, including Vue @click handlers and Citry's own @c-* bindings, which can send another server call. No browser code checks event.isTrusted.
No code runs that the page did not already have, but when a handler takes the name from request data, the request decides which of the page's listeners run.
The trust-boundary doc for #603 rates name as app code and says to pick it from the app's own list.
Options
Keep the rule and say on docs_site/content/events/actions.md that the name must come from the app's own code.
Require a name with a : or - in it (custom event names), or refuse the names of standard DOM events.
Activity