#Custom Events and Custom Elements

1 messages · Page 1 of 1 (latest)

untold lake
#

Good questions.

#

I might not have a very satisfying answer to this. In the case of creating custom events which are dispatched - I do think this would be an improvement over the ad-hoc implementation of Hooks that we currently have to fulfill that similar purpose.

#

That's a switch I would like us to make at some point, but its not something we've prioritized (clearly) - we would have to make that carefully to ensure that the transition path is really easy for modules, a huge number of which use Hooks in their current form.

#

We would certainly need a release version where both a custom event is emitted and the hook is called with a clear deprecation period for Hooks.

#

It's one of those things that, if I could re-do the system today, I would certainly use Custom Events - but now it becomes a significant undertaking to migrate it to a better approach. Not that we're averse to that, we do that kind of foundational work every version, it's just an issue of prioritization.

untold lake
#

With regards to custom elements, this is an are where I have a less clear opinion. It's something I would like to learn more about and possibly use as a replacement for other template rendering helpers. I'm generally aware of custom elements, but it's actually a section of modern web which I haven't had the right window of opportunity to use (or haven't known enough to know that I should be).

#

I'm familiar with the basic premise, and so I recognize that there are some things we could be doing more effectively with custom element definitions.

blissful hull
#

Well, I do know a lot about the topic and use them extensively in every web (or web-based) endeavor since they entered draft status. And they've been a godsend. That said, I started professional code in 1995, so I've watched many languages go through a bunch of ups and downs.

If you're ever interested in my thoughts, or have questions, or simply need a direction, I'm more than open. But I must disclose that I'm heavily biased toward them. So, you'll always have to weigh what I say about them with a grain of salt.

#

Truth be told, I probably over-use them, but I haven't found a reason not to, so far.... LOL

#

Thanks for answering my question tho!! I really appreciate your time.