зеркало из https://github.com/mozilla/gecko-dev.git
Bug 774914 - Ensure newNode is orphan before replacing a node in JSDOMParser (r=mfinkle)
This commit is contained in:
Родитель
b58f751009
Коммит
33ae3d7824
|
@ -323,6 +323,9 @@
|
|||
if (childIndex == -1) {
|
||||
throw "replaceChild: node not found";
|
||||
} else {
|
||||
if (newNode.parentNode)
|
||||
newNode.parentNode.removeChild(newNode);
|
||||
|
||||
childNodes[childIndex] = newNode;
|
||||
newNode.parentNode = this;
|
||||
oldNode.parentNode = null;
|
||||
|
|
Загрузка…
Ссылка в новой задаче