Using DOM.js library kills console.log
Open
Nobody has claimed this yet.
Area:DOM
Bug
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
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 #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>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the p5.js Editor sketch VY-KQxJkA with the scripts listed in index.html, especially p5.js 1.11.1 and the DOM.js include. Compare console.log behavior with DOM.js enabled and disabled; done means the reproduced RangeError is resolved or clearly isolated, with the expected setup and draw messages appearing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100