Starting at ArcGIS Server 10.8, for map services using the ArcGIS Pro runtime, the export request now supports the clipping parameter to clip the image produced, according to the geometry included in the clipping parameter.
This works fine when I test it manually (e.g. Either through the ArcGIS REST Services Directory for the export request, or by using Postman). The image is clipped. However I need to do this clipping within a web application using the ArcGIS API for Javascript 3.
For instance for the ArcGISDynamicMapServiceLayer I see no obvious way to input this clipping parameter. Neither directly or through some other configuration. Is this possible?
If this is not currently supported in the ArcGIS API for Javascript 3, is there a way to hack in some extra parameters when the API makes export requests? So that I could manually set this clipping myself?