I would like to be able to add something to my p5.js code to be able to detect whether the code is being run in the http://editor.p5js.org environment or if it is being run embedded in a website.
If in the editor then I would write a message to the user with print() so they can see it in the bottom left.
If the code is embedded then I would want to write a message using the dom and createP()
The problem is that I need to be able to detect whether the code is being run in the editor or being run embedded. Any advice?
Note: It is basically impossible to see the web console with iPads so writing messages to the dom is a clever way to see error messages.