devpunks / snuggsi

snuggsi ツ - Easy Custom Elements in ~1kB

Home Page:https://snuggsi.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Declarative properties

snuggs opened this issue Β· comments

Look up CE.attributesChangedCallback & CE.observedAttributes

Expected Behavior

<foo-bar baz=bat>
This is πŸ‘‰ {baz}
</foo-bar>

<script>
Element `foo-bar`

(class extends HTMLElement {
  set baz () {
    // defaults to returning this.attributes.baz.nodeValue
    // defaults to being added to observedAttributes
  }
})
</script>
</foo-bar>

Current Behavior

Possible Solution

Steps to Reprod(uce)

Context

Your Environment

  • Version used:
  • Environment name and version (e.g. PHP 5.4 on nginx 1.9.1):
  • Server type and version:
  • Operating System and version:
  • Link to your project: