Open
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
p5.js/1.11.1
Web browser and version
133.0.6943.127 (Official Build) (arm64)
Operating system
macosx
Steps to reproduce this
Steps:
- open https://editor.p5js.org/jht9629-nyu/sketches/VY-KQxJkA
- run
- error appears in console:
- "RangeError: Maximum call stack size exceeded"
- comment out DOM.js include in index.html
- run script and console now shows expected messages
-Also logged as issue on DOM.js:
- DOM.js/issues/7
-- DOM.js breaks console.log in p5js editor General wrapper function to be used for making async functions (like image loading, etc) blocking. #7
Snippet:
// https://editor.p5js.org/jht9629-nyu/sketches/VY-KQxJkA
// DOM.js console.log bug
// run this sketch and get error:
// "RangeError: Maximum call stack size exceeded"
// disable DOM.js include and console.log works
//
function setup() {
console.log('in setup');
}
function draw() {
console.log('in draw');
}
console.log('pre setup');
index.html scripts
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/addons/p5.sound.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/lenincompres/DOM.js@latest/DOM.js"></script>