useResizeObserver
If true
and the autoResize option is enabled, use the ResizeObserver API in your available environment to track canvas size changes.
If false
or if ResizeObserver
is not available, it will use resize
event of window instead.