Skip to content

fix(events): pass only the object to one-argument lambdas and symbol procs in page.on - #701

Open
route wants to merge 1 commit into
mainfrom
fix/on-symbol-proc-callbacks
Open

route wants to merge 1 commit into
mainfrom
fix/on-symbol-proc-callbacks

Conversation

@route

@route route commented Nov 9, 2026

Copy link
Copy Markdown
Member

page.on(:request, &:continue) never continued the request. on yields (object, index, total), so the symbol proc called request.continue(index, total), which raised ArgumentError. The subscriber reported it as a warning and the request stayed paused.

For :request, :response, :auth and :dialog, a lambda taking one argument and a symbol proc now get only the object. Regular blocks still get (object, index, total).

…procs in page.on

page.on(:request, &:continue) called continue(index, total), which raised and was dropped, so the request stayed paused. Callbacks for :request, :response, :auth and :dialog that can't take the extra index and total now get only the object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant