Commit 32e80abc authored by dpapad's avatar dpapad Committed by Commit Bot

WebUI cleanup: Delete unused swapDomNodes() from util.js

Bug: None
Change-Id: I2e1e7dfe3d02c8330bc3739e19207e53215e97f1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706813
Auto-Submit: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Esmael Elmoslimany <aee@chromium.org>
Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678428}
parent 01134cb3
...@@ -144,17 +144,6 @@ function findAncestor(node, predicate) { ...@@ -144,17 +144,6 @@ function findAncestor(node, predicate) {
return last ? node : null; return last ? node : null;
} }
function swapDomNodes(a, b) {
const afterA = a.nextSibling;
if (afterA == b) {
swapDomNodes(b, a);
return;
}
const aParent = a.parentNode;
b.parentNode.replaceChild(a, b);
aParent.insertBefore(b, afterA);
}
/** /**
* Disables text selection and dragging, with optional whitelist callbacks. * Disables text selection and dragging, with optional whitelist callbacks.
* @param {function(Event):boolean=} opt_allowSelectStart Unless this function * @param {function(Event):boolean=} opt_allowSelectStart Unless this function
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment