` tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/t
JS Bin
-
+
@@ -99,7 +99,7 @@ Here's a working example using the `mustache-array-template` working against an
JS Bin
-
+
@@ -140,7 +140,7 @@ Some styling is needed to keep the object visible while not taking any space.
JS Bin
-
+
diff --git a/www/content/extensions/debug.md b/www/content/extensions/debug.md
index e56c13416..e006fa850 100644
--- a/www/content/extensions/debug.md
+++ b/www/content/extensions/debug.md
@@ -8,7 +8,7 @@ or through the `console.log` function with a `DEBUG:` prefix.
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/disable-element.md b/www/content/extensions/disable-element.md
index c2dc79112..82e9acd9d 100644
--- a/www/content/extensions/disable-element.md
+++ b/www/content/extensions/disable-element.md
@@ -9,7 +9,7 @@ This extension disables an element during an htmx request, when configured on th
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/event-header.md b/www/content/extensions/event-header.md
index c2331b041..b0d57d18b 100644
--- a/www/content/extensions/event-header.md
+++ b/www/content/extensions/event-header.md
@@ -9,7 +9,7 @@ request.
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/head-support.md b/www/content/extensions/head-support.md
index 62690dd05..e0e55fed1 100644
--- a/www/content/extensions/head-support.md
+++ b/www/content/extensions/head-support.md
@@ -18,7 +18,7 @@ This extension addresses that shortcoming & will likely be integrated into htmx
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/include-vals.md b/www/content/extensions/include-vals.md
index a4d25790e..5aa62f16b 100644
--- a/www/content/extensions/include-vals.md
+++ b/www/content/extensions/include-vals.md
@@ -9,7 +9,7 @@ will be evaluated as the fields in a javascript object literal.
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/json-enc.md b/www/content/extensions/json-enc.md
index de406689b..1303a497d 100644
--- a/www/content/extensions/json-enc.md
+++ b/www/content/extensions/json-enc.md
@@ -7,7 +7,7 @@ This extension encodes parameters in JSON format instead of url format.
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/loading-states.md b/www/content/extensions/loading-states.md
index a26049ab9..cf9ac641e 100644
--- a/www/content/extensions/loading-states.md
+++ b/www/content/extensions/loading-states.md
@@ -7,7 +7,7 @@ This extension allows you to easily manage loading states while a request is in
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/method-override.md b/www/content/extensions/method-override.md
index 4dbb09da3..1497d7158 100644
--- a/www/content/extensions/method-override.md
+++ b/www/content/extensions/method-override.md
@@ -8,7 +8,7 @@ actual HTTP method. This is necessary when dealing with some firewall or proxy
## Install
```html
-
+
```
### Usage
diff --git a/www/content/extensions/morphdom-swap.md b/www/content/extensions/morphdom-swap.md
index 6fad554b8..396f4a6ad 100644
--- a/www/content/extensions/morphdom-swap.md
+++ b/www/content/extensions/morphdom-swap.md
@@ -10,7 +10,7 @@ The `morphdom` library does not support morph element to multiple elements. If t
## Install
```html
-
+
```
### Usage
diff --git a/www/content/extensions/multi-swap.md b/www/content/extensions/multi-swap.md
index 60183bd21..c34e464ef 100644
--- a/www/content/extensions/multi-swap.md
+++ b/www/content/extensions/multi-swap.md
@@ -11,7 +11,7 @@ It is a very powerful tool in conjunction with `hx-boost` and `preload` extensio
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/path-deps.md b/www/content/extensions/path-deps.md
index f40ef1272..e87c0a38c 100644
--- a/www/content/extensions/path-deps.md
+++ b/www/content/extensions/path-deps.md
@@ -27,7 +27,7 @@ You can use a `*` to match any path component:
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/path-params.md b/www/content/extensions/path-params.md
index 9fd6726eb..9728776eb 100644
--- a/www/content/extensions/path-params.md
+++ b/www/content/extensions/path-params.md
@@ -7,7 +7,7 @@ This extension uses request parameters to populate path variables. Used paramete
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/remove-me.md b/www/content/extensions/remove-me.md
index 2e4686010..6d8b1f900 100644
--- a/www/content/extensions/remove-me.md
+++ b/www/content/extensions/remove-me.md
@@ -7,7 +7,7 @@ The `remove-me` extension allows you to remove an element after a specified inte
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/response-targets.md b/www/content/extensions/response-targets.md
index 992674f4e..ae9c48a66 100644
--- a/www/content/extensions/response-targets.md
+++ b/www/content/extensions/response-targets.md
@@ -24,7 +24,7 @@ The value of each attribute can be:
## Install
```html
-
+
```
## Configure (optional)
diff --git a/www/content/extensions/restored.md b/www/content/extensions/restored.md
index 3f14f6a78..9e84b689f 100644
--- a/www/content/extensions/restored.md
+++ b/www/content/extensions/restored.md
@@ -7,7 +7,7 @@ This extension triggers an event ``restored`` whenever a back button even is det
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/server-sent-events.md b/www/content/extensions/server-sent-events.md
index 13466dbf4..362e264cc 100644
--- a/www/content/extensions/server-sent-events.md
+++ b/www/content/extensions/server-sent-events.md
@@ -18,7 +18,7 @@ Use the following attributes to configure how SSE connections behave:
## Install
```html
-
+
```
## Usage
diff --git a/www/content/extensions/web-sockets.md b/www/content/extensions/web-sockets.md
index edb6cfef8..a6d2410c8 100644
--- a/www/content/extensions/web-sockets.md
+++ b/www/content/extensions/web-sockets.md
@@ -19,7 +19,7 @@ Use the following attributes to configure how WebSockets behave:
## Install
```html
-
+
```
## Usage
diff --git a/www/static/src/htmx.js b/www/static/src/htmx.js
index 0e31707b5..597c9b3b5 100644
--- a/www/static/src/htmx.js
+++ b/www/static/src/htmx.js
@@ -89,7 +89,7 @@ return (function () {
sock.binaryType = htmx.config.wsBinaryType;
return sock;
},
- version: "1.9.11"
+ version: "1.9.12"
};
/** @type {import("./htmx").HtmxInternalApi} */
@@ -138,12 +138,12 @@ return (function () {
/**
* @param {string} tag
- * @param {boolean} global
+ * @param {boolean} [global]
* @returns {RegExp}
*/
- function makeTagRegEx(tag, global = false) {
- return new RegExp(`<${tag}(\\s[^>]*>|>)([\\s\\S]*?)<\\/${tag}>`,
- global ? 'gim' : 'im');
+ function makeTagRegEx(tag, global) {
+ return new RegExp('<' + tag + '(\\s[^>]*>|>)([\\s\\S]*?)<\\/' + tag + '>',
+ !!global ? 'gim' : 'im')
}
function parseInterval(str) {
@@ -1945,6 +1945,9 @@ return (function () {
function shouldProcessHxOn(elt) {
var attributes = elt.attributes
+ if (!attributes) {
+ return false
+ }
for (var j = 0; j < attributes.length; j++) {
var attrName = attributes[j].name
if (startsWith(attrName, "hx-on:") || startsWith(attrName, "data-hx-on:") ||
@@ -1967,11 +1970,11 @@ return (function () {
var iter = document.evaluate('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or' +
' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]', elt)
while (node = iter.iterateNext()) elements.push(node)
- } else {
+ } else if (typeof elt.getElementsByTagName === "function") {
var allElements = elt.getElementsByTagName("*")
for (var i = 0; i < allElements.length; i++) {
- if (shouldProcessHxOn(allElements[i])) {
- elements.push(allElements[i])
+ if (shouldProcessHxOn(allElements[i])) {
+ elements.push(allElements[i])
}
}
}
diff --git a/www/static/test/core/ajax.js b/www/static/test/core/ajax.js
index 00e677df6..58603e851 100644
--- a/www/static/test/core/ajax.js
+++ b/www/static/test/core/ajax.js
@@ -1237,6 +1237,11 @@ describe("Core htmx AJAX Tests", function(){
})
it('properly handles inputs external to form', function () {
+ if (!supportsFormAttribute()) {
+ this._runnable.title += " - Skipped as IE11 doesn't support form attribute"
+ this.skip()
+ return
+ }
var values;
this.server.respondWith("Post", "/test", function (xhr) {
values = getParameters(xhr);
@@ -1287,6 +1292,11 @@ describe("Core htmx AJAX Tests", function(){
})
it("can associate submit buttons from outside a form with the current version of the form after swap", function(){
+ if (!supportsFormAttribute()) {
+ this._runnable.title += " - Skipped as IE11 doesn't support form attribute"
+ this.skip()
+ return
+ }
const template = '