It's hard to guess the motivation for your question, and so some possible answers might or might not address your real interest.
Even in some non-prototype languages it is possible to approximate this effect.
In Java, for example, an anonymous inner class is pretty close to what you're describing - you can create and instantiate a subclass of the original, overriding just the method or methods you want to. The resulting class will be an instanceof
the original class, but will not be the same class.
As to why you'd want to do this? With Java 8 lambda expressions, I think that many of the best use cases go away. With earlier versions of Java, at least, this can avoid a proliferation of trivial, narrow-use classes. That is, when you have a large number of related use-cases, differing in only a tiny functional way, you can create them almost on-the-fly (almost), with the behavioral difference injected at the time you need it.
That said, even pre-J8, this can often be refactored to shift the difference into a field or three, and inject them in the constructor. With J8, of course, the the method itself can be injected into the class, though there may be a temptation to do so when another refactoring may be cleaner (if not as cool).
setClickHandler()
method and make different instances of the same class do very different things. In languages that don't have convenient lambda expressions, it's easier to create a new anonymous subclass just for a new handler. Traditionally, overriding methods was considered the hallmark of a new class, while setting the values of attributes wasn't, but especially with handler functions, the two have very similar effects, so the distinction becomes a war about words.