How to use sampleHeightMostDetailed with Web-worker

Hi Team,

I’m trying to use sampleHeightMostDetailed inside worker of web-worker and as I expected, I received an error about DOM as it is the limitation of web-worker.
I assume that the cause is from Viewer class but I’m not sure.

Would there be a workaround to be able to use sampleHeightMostDetailed with web-worker?

I found that I could use sampleTerrainMostDetailed
with it but my purpose is to get heights from Point cloud tiler so it is not my case.

Error I got:

Uncaught DOMException: Failed to execute 'postMessage' on 'Worker': HTMLCanvasElement object could not be cloned.

Thanks in advance:)