One more idea. Can you add example how to use this code? Then we can discuss how easy it is to use it. I think it really helps even after this pull request as example how to write own external widget factory.