How to trigger a web page to pop up the minute a serial output satisfies a condition?

Can i still do that headless? I connect to it via remote desktop.
So this exec node would basically take in the command of, say "if msg.payload = distance: 20cm, thne pop up browser with video" and work?