If a canvas ID is given but can't be resolved (e.g. the <canvas> element hasn't finished loading yet, which is a common JS development mistake), Jax.Context should throw an error instead of failing silently.
important:Jax.Context is currently designed so that it can be initialized without a corresponding <canvas> element. There are use cases for this and it is valid usage of Jax.Context, but if a not-undefined argument is given to represent the canvas and it can't be resolved, then an error should be raised in order to prevent debugging nightmares.
If a canvas ID is given but can't be resolved (e.g. the
<canvas>
element hasn't finished loading yet, which is a common JS development mistake),Jax.Context
should throw an error instead of failing silently.important:
Jax.Context
is currently designed so that it can be initialized without a corresponding<canvas>
element. There are use cases for this and it is valid usage ofJax.Context
, but if a not-undefined argument is given to represent the canvas and it can't be resolved, then an error should be raised in order to prevent debugging nightmares.