Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo-mod-jslibs-dist.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'alpinejs/packages/morph/dist/module.cjs.js')
-rw-r--r--alpinejs/packages/morph/dist/module.cjs.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/alpinejs/packages/morph/dist/module.cjs.js b/alpinejs/packages/morph/dist/module.cjs.js
index 5bf0fcf..98dc391 100644
--- a/alpinejs/packages/morph/dist/module.cjs.js
+++ b/alpinejs/packages/morph/dist/module.cjs.js
@@ -75,7 +75,9 @@ function dom(el) {
return new DomManager(el);
}
function createElement(html) {
- return document.createRange().createContextualFragment(html).firstElementChild;
+ const template = document.createElement("template");
+ template.innerHTML = html;
+ return template.content.firstElementChild;
}
function textOrComment(el) {
return el.nodeType === 3 || el.nodeType === 8;