Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
const puppeteer = require('puppeteer')
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('')
const dl = JSON.parse(
await page.evaluate(() => JSON.stringify(window.dataLayer))
// normally this will work:
// console.log(performanceTiming)
// but this sandbox doesn't dont console.log extended object in console
console.log(JSON.stringify(dl, null, 4))
await browser.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment