Title: [Low][view] bq-on auto-invoke heuristic keys on includes('(') → silent no-op misfire · Issue #180 · bQuery/bQuery · GitHub
Open Graph Title: [Low][view] bq-on auto-invoke heuristic keys on includes('(') → silent no-op misfire · Issue #180 · bQuery/bQuery
X Title: [Low][view] bq-on auto-invoke heuristic keys on includes('(') → silent no-op misfire · Issue #180 · bQuery/bQuery
Description: Severity: 🟢 Low (correctness — silent no-op) Location src/view/directives/on.ts:18; src/view/directives/on-modifiers.ts:159. Description bq-on decides "bare function reference vs. a call" by testing whether the expression string contains...
Open Graph Description: Severity: 🟢 Low (correctness — silent no-op) Location src/view/directives/on.ts:18; src/view/directives/on-modifiers.ts:159. Description bq-on decides "bare function reference vs. a call" by testin...
X Description: Severity: 🟢 Low (correctness — silent no-op) Location src/view/directives/on.ts:18; src/view/directives/on-modifiers.ts:159. Description bq-on decides "bare function reference vs. a call"...
Opengraph URL: https://github.com/bQuery/bQuery/issues/180
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Low][view] bq-on auto-invoke heuristic keys on includes('(') → silent no-op misfire","articleBody":"## Severity: 🟢 Low (correctness — silent no-op)\n\n## Location\n[`src/view/directives/on.ts:18`](../blob/main/src/view/directives/on.ts#L18); [`src/view/directives/on-modifiers.ts:159`](../blob/main/src/view/directives/on-modifiers.ts#L159).\n\n## Description\n`bq-on` decides \"bare function reference vs. a call\" by testing whether the expression string contains `(`. This misfires on expressions that contain a paren without being the top-level call. Example:\n```html\n\u003cbutton bq-on:click=\"items.find(x=\u003ex).handler\"\u003e\n```\ncontains `(`, so it is treated as a full expression, evaluated once, and the returned `handler` function is **never invoked** — the click silently does nothing. Conversely a bare `handler` (no paren) is auto-invoked but with `this` unbound.\n\n## Suggested fix\nEvaluate the expression via `evaluateRaw`; if the result is a function, invoke it with the event, otherwise treat the evaluation itself as the side effect. This removes the fragile string heuristic entirely.\n\n---\n_Filed as part of a full-codebase security \u0026 correctness audit._\n","author":{"url":"https://github.com/JosunLP","@type":"Person","name":"JosunLP"},"datePublished":"2026-07-05T17:03:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/180/bQuery/issues/180"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:617b0dd7-4f0a-5621-4242-9c80686c8008 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A872:2BF14B:5C3158:7E1703:6A4DA99E |
| html-safe-nonce | 3a77e8b9138ee2458d7b6a0b18c02cec47e43367d258673266727f1c5290d14a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODcyOjJCRjE0Qjo1QzMxNTg6N0UxNzAzOjZBNERBOTlFIiwidmlzaXRvcl9pZCI6IjE0MjM3MjI5NzgyNjkzMDkzNDIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | acce4ce3aab093058504b5b94b1a72e7a116aeb8d59ec5507fcf81f20111b0d1 |
| hovercard-subject-tag | issue:4813696501 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bQuery/bQuery/180/issue_layout |
| twitter:image | https://opengraph.githubassets.com/43b44db12cdafd147ac020a958dc74fb6fef03ca7c007f1012a271d78c955be5/bQuery/bQuery/issues/180 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/43b44db12cdafd147ac020a958dc74fb6fef03ca7c007f1012a271d78c955be5/bQuery/bQuery/issues/180 |
| og:image:alt | Severity: 🟢 Low (correctness — silent no-op) Location src/view/directives/on.ts:18; src/view/directives/on-modifiers.ts:159. Description bq-on decides "bare function reference vs. a call" by testin... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JosunLP |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| go-import | github.com/bQuery/bQuery git https://github.com/bQuery/bQuery.git |
| octolytics-dimension-user_id | 256381806 |
| octolytics-dimension-user_login | bQuery |
| octolytics-dimension-repository_id | 1139284244 |
| octolytics-dimension-repository_nwo | bQuery/bQuery |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1139284244 |
| octolytics-dimension-repository_network_root_nwo | bQuery/bQuery |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 47723578ce6819210724ef064c858fce6d3115a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width