If anyone wants a clear-cut reference, see "Set Theory" by Jech where he not only gives the same precise definitions in line with what I said here, and is careful to
always say "is onto
something" and
never says "is a surjection", but also defines functions by giving only domain and mapping (not giving any codomain) (e.g. Theorem 3.2 and Lemma 3.3). —
user21820 Nov 7 at 13:31