File tree Expand file tree Collapse file tree
view/base/templates/script Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ if ($interval < 10) {
161161 }
162162
163163 Alpine.mutateDom(() => {
164- LokiHtmlReplacer.replace(targetElement, newTargetElement.innerHTML );
164+ LokiHtmlReplacer.replace(targetElement, newTargetElement);
165165 Alpine.destroyTree(targetElement);
166166 Alpine.initTree(targetElement);
167167 });
Original file line number Diff line number Diff line change 11<script>
22 const LokiHtmlReplacer = {
3- replace(root, incomingHTML ) {
3+ replace(root, newRoot ) {
44 if (root.hasAttribute('x-ignore')) {
55 return;
66 }
77
8+ root.getAttributeNames().forEach(attributeName => {
9+ root.removeAttribute(attributeName);
10+ });
11+
12+ newRoot.getAttributeNames().forEach(attributeName => {
13+ root.setAttribute(attributeName, newRoot.getAttribute(attributeName));
14+ });
15+
16+ const incomingHTML = newRoot.innerHTML;
817 const incomingFrag = this.parseHTML(incomingHTML);
918 const existingSkips = root.querySelectorAll('[x-ignore]');
1019
You can’t perform that action at this time.
0 commit comments