diff options
-rw-r--r-- | www/content/api.md | 1 | ||||
-rw-r--r-- | www/content/attributes/hx-inherit.md | 2 | ||||
-rw-r--r-- | www/content/reference.md | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/www/content/api.md b/www/content/api.md index e2dada72..4b9749a7 100644 --- a/www/content/api.md +++ b/www/content/api.md @@ -126,6 +126,7 @@ Note that using a [meta tag](@/docs.md#config) is the preferred mechanism for se * `wsReconnectDelay:'full-jitter'` - string/function: the default implementation of `getWebSocketReconnectDelay` for reconnecting after unexpected connection loss by the event code `Abnormal Closure`, `Service Restart` or `Try Again Later` * `wsBinaryType:'blob'` - string: the [the type of binary data](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType) being received over the WebSocket connection * `disableSelector:"[hx-disable], [data-hx-disable]"` - array of strings: htmx will not process elements with this attribute on it or a parent +* `disableInheritance:false` - boolean: If it is set to `true`, the inheritance of attributes is completely disabled and you can explicitly specify the inheritance with the [hx-inherit](@/attributes/hx-inherit.md) attribute. * `scrollBehavior:'instant'` - string: the scroll behavior when using the [show](@/attributes/hx-swap.md#scrolling-scroll-show) modifier with `hx-swap`. The allowed values are `instant` (scrolling should happen instantly in a single jump), `smooth` (scrolling should animate smoothly) and `auto` (scroll behavior is determined by the computed value of [scroll-behavior](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior)). * `defaultFocusScroll:false` - boolean: if the focused element should be scrolled into view, can be overridden using the [focus-scroll](@/attributes/hx-swap.md#focus-scroll) swap modifier * `getCacheBusterParam:false` - boolean: if set to true htmx will append the target element to the `GET` request in the format `org.htmx.cache-buster=targetElementId` diff --git a/www/content/attributes/hx-inherit.md b/www/content/attributes/hx-inherit.md index f045794d..d8db6e36 100644 --- a/www/content/attributes/hx-inherit.md +++ b/www/content/attributes/hx-inherit.md @@ -7,7 +7,7 @@ The default behavior for htmx is to "inherit" many attributes automatically: tha that target. Some people do not like this feature and instead prefer to explicitly specify inheritance for attributes. To support this mode of development, htmx offers the `htmx.config.disableInheritance` setting, which can be set to -`false` to prevent inheritance from being the default behavior for any of the htmx attributes. +`true` to prevent inheritance from being the default behavior for any of the htmx attributes. The `hx-inherit` attribute allows you to control the inheritance of attributes manually. diff --git a/www/content/reference.md b/www/content/reference.md index e4f6e63f..709a103b 100644 --- a/www/content/reference.md +++ b/www/content/reference.md @@ -239,6 +239,7 @@ listed below: | `htmx.config.wsReconnectDelay` | defaults to `full-jitter` | | `htmx.config.wsBinaryType` | defaults to `blob`, the [the type of binary data](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType) being received over the WebSocket connection | | `htmx.config.disableSelector` | defaults to `[hx-disable], [data-hx-disable]`, htmx will not process elements with this attribute on it or a parent | +| `htmx.config.disableInheritance` | defaults to `false`. If it is set to `true`, the inheritance of attributes is completely disabled and you can explicitly specify the inheritance with the [hx-inherit](@/attributes/hx-inherit.md) attribute. | `htmx.config.withCredentials` | defaults to `false`, allow cross-site Access-Control requests using credentials such as cookies, authorization headers or TLS client certificates | | `htmx.config.timeout` | defaults to 0, the number of milliseconds a request can take before automatically being terminated | | `htmx.config.scrollBehavior` | defaults to 'instant', the scroll behavior when using the [show](@/attributes/hx-swap.md#scrolling-scroll-show) modifier with `hx-swap`. The allowed values are `instant` (scrolling should happen instantly in a single jump), `smooth` (scrolling should animate smoothly) and `auto` (scroll behavior is determined by the computed value of [scroll-behavior](https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-behavior)). | |