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

@justinfagnani decorators were a mistake to mention, if only because they are distracting from my core proposal: functions. In your case `WindowOrWorkGlobalScope` is a function that takes a constructor and I assume does something like `return class extends Object {};` internally, right?

FWIW decorators use the return value of functions, so you could rewrite this as:

```js
@WindowOrWorkerGlobalScope
class MyGlobalLikeThing {}
```

See http://codepen.io/treshugart/pen/zZOrYX?editors=1010 for an example of this with a custom element.

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

Received on Wednesday, 22 February 2017 07:51:47 UTC