- From: Matthew Phillips <notifications@github.com>
- Date: Fri, 29 Jul 2016 08:21:56 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Friday, 29 July 2016 15:22:54 UTC
An alternative to `is=""` could be custom attributes.  @rniwa mentioned mixins and this would be a form of that (maybe you had something else in mind). I think it solves the issues that people on boths sides have, and could have a very similar API to custom elements. Something like:
```js
class FooBarAttr {
  attachedCallback() {
    console.log('was created for first time');
  }
  changedCallback(newValue, oldValue) {
    console.log('it changed');
  }
}
customAttributes.define('foo-bar', FooBarAttr);
```
This would be super simple to polyfill with MutationObservers as well.
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/509#issuecomment-236209926
Received on Friday, 29 July 2016 15:22:54 UTC