diff options
author | Vincent <vichenzo-thebaud@hotmail.com> | 2024-03-21 23:06:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-21 16:06:44 -0600 |
commit | e64238dba3113c2eabe26b1e9e9ba7fe29ba3010 (patch) | |
tree | 8a561aadcf28c273028796f80823b6afc42734bd /test/core | |
parent | 9b1e9bc336ffd40ee62dd2af8b21c6894e4b45f2 (diff) | |
download | htmx-e64238dba3113c2eabe26b1e9e9ba7fe29ba3010.tar.gz htmx-e64238dba3113c2eabe26b1e9e9ba7fe29ba3010.zip |
Fix IE11 incompatibilities (#2408)
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/ajax.js | 10 | ||||
-rw-r--r-- | test/core/regressions.js | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/core/ajax.js b/test/core/ajax.js index 00e677df..58603e85 100644 --- a/test/core/ajax.js +++ b/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 = '<form ' + 'id="hello" ' + 'hx-target="#hello" ' + diff --git a/test/core/regressions.js b/test/core/regressions.js index 6a8c8e66..bd6c2277 100644 --- a/test/core/regressions.js +++ b/test/core/regressions.js @@ -246,6 +246,11 @@ describe("Core htmx Regression Tests", function(){ }) it("script tags only execute once using templates", function(done) { + if (!supportsTemplates()) { + this._runnable.title += " - Skipped as IE11 doesn't support templates" + this.skip() + return + } var oldUseTemplateFragmentsValue = htmx.config.useTemplateFragments htmx.config.useTemplateFragments = true @@ -267,6 +272,11 @@ describe("Core htmx Regression Tests", function(){ }) it("script tags only execute once when nested using templates", function(done) { + if (!supportsTemplates()) { + this._runnable.title += " - Skipped as IE11 doesn't support templates" + this.skip() + return + } var oldUseTemplateFragmentsValue = htmx.config.useTemplateFragments htmx.config.useTemplateFragments = true |