async function printVisibleView(page) {
  console.log('Visible panel:', await page.$eval(':target', el => el.textContent));
}
Hash (#) changes aren't considered navigations in Chrome. This makes it
tricky to test a SPA that use hashes to change views.

This script shows how to observe the view of a SPA changing in Puppeteer
by injecting code into the page that listens for `hashchange` events.

To run:
1. Start a web server in this folder on port 5000.
2. node hash_navigation.js