Skip to content

Instantly share code, notes, and snippets.

@amb26
Created May 20, 2021 19:27
Show Gist options
  • Select an option

  • Save amb26/0e89cdfb0cbb29975b222a09cbbdf177 to your computer and use it in GitHub Desktop.

Select an option

Save amb26/0e89cdfb0cbb29975b222a09cbbdf177 to your computer and use it in GitHub Desktop.
fluid.renderer.fuseNode = function (target, source) {
while (source.childNodes.length > 0) {
target.appendChild(source.firstChild);
}
for (var i = 0; i < source.attributes.length; i++) {
var attrib = source.attributes[i];
if (attrib.name !== "class" && attrib.name !== "id") {
target.setAttribute(attrib.name, attrib.value);
}
}
target.classList.add.apply(target.classList, source.classList);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment