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

> You seemed to forget why namespaces are useful. Your functions cannot be just global scope pollution, those functions belongs to Custom Elements, so let's put them in the only global namespace introduced for the goal: the customElements registry, or its CustomElementRegistry class (I don't like typing that much, I'm being honest)

I'm speaking in terms of "pure" functions. As in, technically they may be called "methods" because they're on an object instance, but they don't store any state or have any side effects other than, quite possibly, mutating the class that's passed in as to avoid long prototype chains (if this is even an issue). I'm 100% behind them being in the `customElements` namespace.

> This is upside down.

I don't think it's anyone's place but ours to determine the validity of our reasoning.

> Have you read this bug at all?

Yep.

> You cannot trust transpilers, not polyfills!!!

Subjective. Objectively, polyfills were proven to be an issue for us.

> I'm growing white hair to advocate about transpilers problems, or suggest solutions,or create libraries immune to transpilers, and you tell me the problem is my super stable and tested polyfill used even by the production delivered Google AMP Project?

I never mentioned your polyfill. Specifically, it was mostly the shadow DOM polyfill, though we had some issues with others, they were fairly minor. I apologise if you're taking this personally, but I think it's best if we try and get this discussion back on track.

@rniwa what are your thoughts on using simple functions that are compatible with the decorator pattern, sitting within the `customElements` namespace, or similar? If you think this is a place you'd like to take the discussion, I'm happy to try and make a more end-to-end proposal.

It would be good for other WG members to weigh in, too.

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

Received on Wednesday, 22 February 2017 00:47:26 UTC