I have got this working using ShadowDOM example.
The critical piece was to pass (as @ghiscoding indicates) is to set the options.shadowRoot item.
I believe the errors like TypeError: Cannot read properties of null (reading '0') where from extra controls I taken from a different example - commenting these out for now.