Skip to content

Call form methods through callBuiltIn in every runtime listener #703

Closed

Description

@JuroOravec

The problem

Citry's browser runtime calls some DOM methods directly on elements that can be a <form>. A form exposes each named control as a property, so a control named addEventListener, removeEventListener, contains, querySelectorAll or isConnected hides the form's own method of that name. The call then throws or reads the control instead.

Places found by reading packages/py/citry/citry/_vue/client.js (nothing was run):

  • server-event listeners attached for v-citry-runtime-events: element.addEventListener / removeEventListener around :4545, :4599, :4613, :4616. The comment above callBuiltIn (around :28-30) says every listener Citry attaches to a form goes through callBuiltIn, so the code and the comment disagree.
  • a component root that is a form: root.contains(...) (around :3511, the Citry.events.send(element) lookup) and root.querySelectorAll(...) / root.isConnected (around :5439, :5500-5501, keeping control values across a server render).

The effect is that a server-event binding is not attached, or an element is not found, when a form holds a control with one of those names. No code runs and nothing navigates. Control names can come from data (for example a form built from a schema).

Fix

Call these through the existing callBuiltIn / builtInMember helpers, as the @c-* listener path already does.

Found while writing the trust-boundary design doc for #603.

🤖 Generated with Claude Code

Activity

  1. changed the title [-]Call form methods through callBuiltIn in the remaining runtime listeners[/-] [+]Call form methods through callBuiltIn in every runtime listener[/+] on Nov 15, 2026
  2. added
    next-sprint
    on Nov 15, 2026
  3. added this to the 1.1.0 milestone on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    next-sprint

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions