Get instance of viewer using document.getElementById or similar?

Is there any way to get an instance of the viewer using the document object? Or, if that’s the wrong approach, how would I go about getting an instance/reference to the viewer that’s been created. I hope the context of my question is clear in that I’m trying to access it in a part of the code that is out of scope with the place where the viewer was created initially.

Thanks!

Hi @ssteph,

Cesium doesn’t add any instances of the viewer to document or window. This is something you’ll have to manage in your application code.

Best regards,

Hannah