As updateAsync refreshes the shapediver-domElements, I need to call a function (that adds special classes to these elements) following each update. I’m unable to accomplish this via async (promises) unless I rely on a setTimeout (I really don’t want to rely on a setTimeout). I’m hoping there’s an easier way before digging into MutationObserver.
Does ShapeDiver provide a method of knowing when the shapediver-domElements have been added to the page?
After digging into MutationObserver, it seems the best overall method of adding custom classes to shapediver-domElements. I can just create an observer and know that my classes will be added without having to use a callback every time the viewer updates shapediver-domElements.
In light of this, the topic title is probably irrelevant.
For my usage scenario (applying a class based on 2D text tags being a number or not), I’m using this to moot my issue: