Bug 1141498, part 1 - Stop using Node.remove() in the DOM animation test's testcommon.js. r=dholbert

--HG--
extra : rebase_source : 70fdcc2f1419ae1ea88cc58db909efe11ba620a1
This commit is contained in:
Jonathan Watt 2015-03-04 02:49:43 +00:00
parent 5d46e8dcd3
commit 5825187ee1

View File

@ -12,7 +12,11 @@ function addDiv(t) {
var div = document.createElement('div');
document.body.appendChild(div);
if (t && typeof t.add_cleanup === 'function') {
t.add_cleanup(function() { div.remove(); });
t.add_cleanup(function() {
if (div.parentNode) {
div.parentNode.removeChild(div);
}
});
}
return div;
}