from the proxied content in order to reflect document
  // metadata etc. in the current frame.
  window.addEventListener('message', event => {
    const contentFrame = document.querySelector('.js-content-frame');
    const loadingIndicator = document.querySelector('.js-loading-indicator');

    if (event.source !== contentFrame.contentWindow) {
      return;
    }

    const message = validateContentFrameMessage(event.data);
    if (!message) {
      return;
    }

    if (message.type === 'metadatachange')