-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardNeeds review from a maintainer before moving forwardBugError or unexpected behaviorsError or unexpected behaviors
Description
p5.js version
2.0.5
What is your operating system?
Mac OS
Web browser and version
Google Chrome 140.0.7339.208 (Official Build) (arm64)
Actual Behavior
Using print function to print variables open up the print webpage popup instead of printing in the console.
screenshot for reference:
It happens only when the print function is written without any arguments and the auto-refresh is kept on.

On typing some variable afterwards it correctly prints the variable in the consiole without the above issue.

Expected Behavior
Expecting the code to not open the print popup.
It should either throw some error saying print can't be called with no arguments or should not print anything to console and let the user figure out the error.
Steps to reproduce
Steps:
- paste the below code.
- run the code and you will see that the print popup shows up
Snippet:
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
print()
}
Metadata
Metadata
Assignees
Labels
Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardNeeds review from a maintainer before moving forwardBugError or unexpected behaviorsError or unexpected behaviors