Update custom.js

Explain different semantics required for instances versus functions or classes. Based on comments of @minrk in #5985.