Re: [WICG/webcomponents] `CustomElementRegistry.define()` should return the new custom element (#927)

In general on the web platform this "chaining" style, where modifier functions return one of their arguments, is discouraged. If you have the argument already, having two ways to get it---the value you passed in, and the return value---just makes for unreadable code.

In particular, the OP seems based on the misconception that customElements.get() returns something special. It does not. In the example given it just returns Test, which the code already has access to.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/927#issuecomment-846583911

Received on Sunday, 23 May 2021 15:50:22 UTC