function replaceBody(element) {
  const body = document.body;
  const app = body.querySelector('history-app');

  const currentBody = app || body.querySelector('.test-body');
  body.removeChild(currentBody);

  // Clear any query in the URL.
  window.history.replaceState({}, '', '/');

  element.classList.add('test-body');
  body.appendChild(element);
}
/**
 * Replace the current primary element of the test with a new element. Useful
 * as an alternative to PolymerTest.clearBody() which preserves styling.
 * @param {Element} element
 */
Replace the current primary element of the test with a new element. Useful
as an alternative to PolymerTest.clearBody() which preserves styling.
@param {Element} element
Replace the current primary element of the test with a new element . Useful as an alternative to PolymerTest . clearBody () which preserves styling . @param { Element } element
function replaceBody(element) {
  const body = document.body;
  const app = body.querySelector('history-app');
  const currentBody = app || body.querySelector('.test-body');
  body.removeChild(currentBody);
  window.history.replaceState({}, '', '/');
  element.classList.add('test-body');
  body.appendChild(element);
}
function replaceBody ( element ) { const body = document . body ; const app = body . querySelector ( 'history-app' ) ; const currentBody = app || body . querySelector ( '.test-body' ) ; body . removeChild ( currentBody ) ; window . history . replaceState ( { } , '' , '/' ) ; element . classList . add ( 'test-body' ) ; body . appendChild ( element ) ; }
Replace the current primary element of the test with a new element.
Replace the current primary element of the test with a new element .
// Clear any query in the URL.