diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 33bd4154c93b..1eb14442adaa 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -17,9 +17,10 @@ describe(' tag', function () { }) afterEach(function () { - if (document.body.contains(webview)) { - document.body.removeChild(webview) + if (!document.body.contains(webview)) { + document.body.appendChild(webview) } + webview.remove() if (w) { w.destroy() w = null