Show.bind with error message


#1

Trying to use show.bind I get an error message in browser-console :

TypeError: element.classList is undefined

Find here the gist reconstructing the error:

edit: it seems that this error occurs because of the @containerless attribute. But adding a container only for handling the show.bind makes my html quite dirty :frowning:


#2

You can employ as element attribute. Note that having container name greatly increases debugability


#3

What do you mean with “employ as element attribute”? Could you give me an example?


#4

My guess from what you described

<!-- instead of: -->
<my-comp containerless></my-comp>
<!-- Do: -->
<div as-element="my-comp"></div>