Dynamic widget loader for use with ArcGIS JavaScript API