| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * Replace the current primary element of the test with a new element. Useful |
| 7 * as an alternative to PolymerTest.clearBody() which preserves styling. |
| 8 * @param {Element} element |
| 9 */ |
| 10 function replaceBody(element) { |
| 11 var body = document.body; |
| 12 while (body.children.length > 0) |
| 13 body.removeChild(body.children[0]); |
| 14 body.appendChild(element); |
| 15 } |
| OLD | NEW |