I want to write a little helper with a Javascript Browser Snippet that opens multiple urls in my local environment. In Chrome, open DevTools => Sources => Snippets and create a new Snippet. Here I tried the following:
const skins = ["skin1", "skin2", "skin3"]
const openAllSkins = () => {
skins.map(skin => window.open(`http://${skin}.loc.mylocalenv.com:7000`, `_blank`)
}
openAllSkins()
When I run the snippet (right click the snippet => Run), it only opens the first skin. Why doesn't it work for all the other skins? When debugging, I can proof that the mapping runs through all skins, but somehow only the first one will be opened. 🤔
Any hints much appreciated.