That looks a lot like the element builder function that Fastmail put together back in 2012.<p><a href="https:&#x2F;&#x2F;blog.fastmail.com&#x2F;2012&#x2F;02&#x2F;20&#x2F;building-the-new-ajax-mail-ui-part-2-better-than-templates-building-highly-dynamic-web-pages&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.fastmail.com&#x2F;2012&#x2F;02&#x2F;20&#x2F;building-the-new-ajax-m...</a><p>I too am fond of that approach.