slimjs / slim.js

Fast & Robust Front-End Micro-framework based on modern standards

Home Page:http://slimjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@attribute throws 'cannot read property push of autoBoundAttributes'

David-Mulder opened this issue · comments

image

This is in combination with Webpack and Babel, using the following code

@tag('some-element')
class A extends Slim {
  @attribute
  myProperty // bounds to my-property attribute automatically.
}

Need to add a default value to the decorator, something like ... target.constructor.autoBoundAttributes = target.constructor.autoBoundAttributes || [] before pushing it.
Would you like to contribute or want me to do it myself?

@David-Mulder Using polyfills, property attribute cannot target the correct class, as the actual HTML element's class is not the one provided by the code. I will try to look up some way to workaround this, but for now, this attribute remains undocumented as it doesn't work properly.

Deprecated Feature on deprecated version.