diff --git a/dom/animation/test/testcommon.js b/dom/animation/test/testcommon.js index beb4c8a40c1e..461629f48995 100644 --- a/dom/animation/test/testcommon.js +++ b/dom/animation/test/testcommon.js @@ -12,7 +12,9 @@ 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() { + div.parentNode.removeChild(div); + }); } return div; }