mastodon.ar.al is one of the many independent Mastodon servers you can use to participate in the fediverse.
This is my personal fediverse server.

Administered by:

Server stats:

1
active users

Oh how I wish you could reference the current scope in JavaScript. The things you could do…

e.g., scope['someImport']…

Aral Balkan

Hmm… I think I might be able to create what I want by maintaining a component registry manually in my ES Module Loader and communicating it to the main process via an interprocess communication channel (BroadcastChannel)… but, yeah, being able to reference the current scope would be nice (and much simpler).

🤷‍♂️

(Basically, what I want is for Kitten¹ to be able to introspect the source code of a component, find the related components, and wire them up to handle events from the client (including garbage collection of listeners) without having to manually register the dependent component classes. Don’t Repeat Yourself and all that…)

Anyway… niche :)

¹ kitten.small-web.org

(Nope, because, of course, the actual reference doesn’t exist at the loader stage.)

Oh, well, I’m going to try and make it so that you’ll at least be able to connect child components in the markup itself so you don’t have to remember to do it in some other place. That should, at least, be doable.