Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HtmxAjaxHelperContext typedef should have all optional fields #2701

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/htmx.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ type HtmxAjaxHelperContext = {
source?: Element | string;
event?: Event;
handler?: HtmxAjaxHandler;
target: Element | string;
target?: Element | string;
swap?: HtmxSwapStyle;
values?: any | FormData;
headers?: Record<string, string>;
Expand Down
2 changes: 1 addition & 1 deletion src/htmx.js
Original file line number Diff line number Diff line change
Expand Up @@ -5036,7 +5036,7 @@ var htmx = (function() {
* @property {Element|string} [source]
* @property {Event} [event]
* @property {HtmxAjaxHandler} [handler]
* @property {Element|string} target
* @property {Element|string} [target]
* @property {HtmxSwapStyle} [swap]
* @property {Object|FormData} [values]
* @property {Record<string,string>} [headers]
Expand Down
2 changes: 1 addition & 1 deletion www/content/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ or
* `verb` - 'GET', 'POST', etc.
* `path` - the URL path to make the AJAX
* `context` - a context object that contains any of the following
* `source` - the source element of the request
* `source` - the source element of the request, `hx-*` attrs which affect the request will be resolved against that element and its ancestors
* `event` - an event that "triggered" the request
* `handler` - a callback that will handle the response HTML
* `target` - the target to swap the response into
Expand Down