AI OnAI Off
I have 'resolved' the issue by completely rebuilding the dojo/dijit part based on extending _SelectorBase, using elements of https://tedgustaf.com/blog/2016/display-thumbnail-for-image-properties-in-episerver/ as a template.
I'm working on creating a property editor widget in Episerver CMS 10 that allows a user to select a file from our DAM system, and then store that in a Url property on a ContentBlock. I have based it on a combination of https://tedgustaf.com/blog/2016/custom-editor-for-string-list-properties-in-episerver/ and http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/7/Editing/How-To/Creating-an-Editor-Widget/ and it can select a file (via a selector hosted in the DAM system), feed back the URL via window.postMessage to the widget, then display the new value. However, despite calling
the CMS isn't recognising that the value has changed nor is it allowing it to be saved. The full JS (note: it's work in progress!) is at https://pastebin.com/cts7tYC4 and the widget template is at https://pastebin.com/yYi1DX8f
The value passed to onChange is either a string or null. The backing property is of type EPiServer.Url.
What do I need to modify to make the CMS recognise the change in value?
EDIT: Interestingly, it seems to take notice sometimes if a null value is passed to onChange