Skip to content

Commit

Permalink
* xover.xml.combine - added extra checks to copy attributes
Browse files Browse the repository at this point in the history
* Document.prototype.observe - fixed section render
  • Loading branch information
uriel-online committed Dec 18, 2023
1 parent 51e1418 commit c7e6681
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4871,7 +4871,7 @@ xover.xml.staticMerge = function (node1, node2) {
}

xover.xml.combine = function (target, new_node) {
if (target instanceof Element && (target.hasAttribute("xo-source") || target.hasAttribute("xo-stylesheet"))) {
if (target instanceof Element && (target.hasAttribute("xo-source") && target.getAttribute("xo-source") == new_node.getAttribute("xo-source") || target.hasAttribute("xo-stylesheet") && target.getAttribute("xo-stylesheet") == new_node.getAttribute("xo-source"))) {
target.staticAttributes = target.staticAttributes || [...target.attributes || []].map(attr => `@${attr.name}`);
}
let swap = document.firstElementChild.cloneNode().classList;
Expand Down Expand Up @@ -8234,8 +8234,8 @@ xover.modernize = async function (targetWindow) {
let active_element = document.activeElement;
if (section.contains(active_element)) {
await xover.delay(100);
section.render().then(() => active_element.classList && active_element.classList.remove("xo-working"))
}
section.render().then(() => active_element.classList && active_element.classList.remove("xo-working"))
}
//for (let store of Object.values(xover.stores).filter(store => store.document === self)) {
// store.render()
Expand Down

0 comments on commit c7e6681

Please sign in to comment.