That AddListener line works from the inside too. If you extend InputField you can access the onEndEdit event since it’s a public field of InputField, and derived class inherit all the public and protected fields.
But your question is weird, it sounds like you’re adding a feature that already exists, that’s what onEndEdit is used for.