Importing the code from bs4-accordion.html just once, <bs4-accordion> becomes a tag available anywhere in the document. The slightly monotonous init JS is because of the specificity of Bootstrap syntax but with the Custom Element it sets all that up for you.
Importing the code from
bs4-accordion.html
just once,<bs4-accordion>
becomes a tag available anywhere in the document. The slightly monotonous init JS is because of the specificity of Bootstrap syntax but with the Custom Element it sets all that up for you.Sounds ideal then :)
Have you looked at riot.js? Perhaps some knowledge to glean from there too.
Are you happy with it?