You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{JSDOM}from"jsdom";const{ window }=newJSDOM("",{pretendToBeVisual: false,});window.eval(`requestAnimationFrame`);// ReferenceError: requestAnimationFrame is not defined
Instead of erroring with ReferenceError: requestAnimationFrame is not defined, I would like to request an error message like, ReferenceError: requestAnimationFrame is not defined because JSDOM's pretendToBeVisual option is set to false. This would help users resolve this error when they are unaware that JSDOM is even in use; in some contexts, JSDOM is a transitive dependency.
Once I hear feedback that this is a good idea, I might be able to create a PR for it.
The text was updated successfully, but these errors were encountered:
Basic info:
Minimal reproduction case
How does similar code behave in browsers?
Feature request
Instead of erroring with
ReferenceError: requestAnimationFrame is not defined
, I would like to request an error message like,ReferenceError: requestAnimationFrame is not defined because JSDOM's pretendToBeVisual option is set to false
. This would help users resolve this error when they are unaware that JSDOM is even in use; in some contexts, JSDOM is a transitive dependency.Once I hear feedback that this is a good idea, I might be able to create a PR for it.
The text was updated successfully, but these errors were encountered: