DEV Community

loading...

Discussion on: How I accidentally wrote an awesome HTML Preprocessor

morgboer profile image
Riaan Pietersen

That's it! Could it be envoked inline, like the other replacements, through some sort of a tag? This seems quite specific with a lot of javascript triggering it?

Thread Thread
nektro profile image
Meghan (she/her) Author

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.

Thread Thread
morgboer profile image
Riaan Pietersen • Edited

Sounds ideal then :)

Have you looked at riot.js? Perhaps some knowledge to glean from there too.

Are you happy with it?