Skip to content

Rename htmx.ajax() context to options - #3940

Open
scriptogre wants to merge 1 commit into
bigskysoftware:four-devfrom
scriptogre:4.0/rename-ajax-context-to-options
Open

Rename htmx.ajax() context to options#3940
scriptogre wants to merge 1 commit into
bigskysoftware:four-devfrom
scriptogre:4.0/rename-ajax-context-to-options

Conversation

@scriptogre

@scriptogre scriptogre commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

The third htmx.ajax() argument contains options used to build the request context. Calling both objects context makes them difficult to distinguish.

Before:

htmx.ajax(method, url, context)
HtmxAjaxContext

After:

htmx.ajax(method, url, options)
HtmxAjaxOptions

Changes

  1. Rename the runtime argument from context to options.
  2. Rename HtmxAjaxContext to HtmxAjaxOptions.
  3. Update docs and test names.
  4. Link options to the request context shape.

JavaScript calls and runtime behavior do not change.

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