One reason I was hesitant to adopt Experience Builder was its limited support for custom widgets that can work dynamically with whatever layers are currently on the map. The last time I evaluated it, a widget had to be configured at design time with specific layers, meaning you needed to know in advance which layers it would interact with.
In the applications I work on, users can load any layers into the map at runtime and then use a custom widget to operate on some or all of those layers.
So my question is: is this now possible in Experience Builder?
I just use this to detect the layers during runtime
arcgisMap.view.map.layers.map(async function (lyr) {