If you decide to create Script/Plugins for AE, you should get terminology correct.
Extension = a script that works inside a web interface. I think you can use EcmaScript 6 inside the web part and EcmaScript 3 inside the script part.
Plugin = a whole different league. Programmed in C++. You can access about anything in AE with those. But are much much more complicated than scripts or extensions.
Now, for your answer.
I don't have much experience with Extensions but have a fair bit with scripts.
And since an Extension is a script with web interface, I'm gonna take a wild guess and say no. I don't think you can add things like layer.onSelect().
If you are new to Extensions, this tutorial could help you understand how they work.