Have you considered wrapping this in web component so it can be used without the div + constructor call ceremony?