Search code examples
autodeskautodesk-forgeautodesk-viewer

Viewer and viewer.container event listeners


I noticed that both viewer and viewer.container have functions to add and remove events, but not every event work on both.

So what is the difference between them and which events should be used with each object?

Also, is there a way to view what events are registered on each object?


Solution

  • viewer.container is the DOM element that contains the viewer canvas. As far as I know there is no direct way to know which events are registered on those objects but since it has to be registered by your own app at some point it shouldn't be too hard to track this down by the mechanism of your choice.