Added new frontend.
This commit is contained in:
1 parent
8005b38b67
commit
9ada7cc1a8
30 files changed
+6620
-1
No files matched your search
@@ -0,0 +1,17 @@
|
||||
htmx.defineExtension('morphdom-swap', {
|
||||
isInlineSwap: function(swapStyle) {
|
||||
return swapStyle === 'morphdom';
|
||||
},
|
||||
handleSwap: function (swapStyle, target, fragment) {
|
||||
if (swapStyle === 'morphdom') {
|
||||
if (fragment.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||
// IE11 doesn't support DocumentFragment.firstElementChild
|
||||
morphdom(target, fragment.firstElementChild || fragment.firstChild);
|
||||
return [target];
|
||||
} else {
|
||||
morphdom(target, fragment.outerHTML);
|
||||
return [target];
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user