devpunks / snuggsi

snuggsi ツ - Easy Custom Elements in ~1kB
https://snuggsi.com
MIT License
398 stars 17 forks source link

Exotic event handlers not rendering by default. #51

Closed snuggs closed 7 years ago

snuggs commented 7 years ago

Addendum to #46 #50.

Issue

When using exotic event handler this.render () is not being called. When we use an implicit handler on the custom element this.render () does get called.

Example

<foo-bar onclick=onbaz></foo-bar>

<script>

Element `foo-bar`

(class extends HTMLElement {

  static onbaz ()
    { /* never calls `this.render ()` */ }
})

</script>

/cc @janz93 @brandondees @btakita @RobertChristopher