Re: [w3c/webcomponents] The is="" attribute is confusing? Maybe we should encourage only ES6 class-based extension. (#509)

@treshugart I don't think decorators are the right solution for platform mixins because they are applied to the wrong thing - the concrete subclass of HTMLElement that the developer is writing.

Class mixins do the right thing, because they apply to the prototype chain above the target class. Methods can be override, super calls, etc:

```javascript
class MyGlobalLikeThing = WindowOrWorkerGlobalScope(Object) {
  fetch(input, init) {
    // do something
    return super.fetch(input, init);
  }
}
```

-- 
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-281584350

Received on Wednesday, 22 February 2017 06:47:03 UTC