<!DOCTYPE html>
<p>This is a frame that tries to navigate via history API.</p>
<script>
window.onmessage = (e) => {
  if (e.data == 'back') {
    history.back();
  } else if (e.data == 'forward') {
    history.forward();
  } else if (e.data = 'pushstateback') {
    onpopstate = (e) => {
      parent.postMessage('pushstatebackdone', '*');
    };

    history.pushState({someState: 'blah'}, '');
    history.back();
  }
};
</script>
