Given a (smooth) manifold, it is known that derivations $D:C^\infty(U) \to C^\infty(U)$ on a chart $(U,\kappa)$ are equivalent to a vectorfield on $U$, i.e. to an element $X \in \Gamma(TU \to U)$. The definition of a derivation is that $D$ is $\mathbb R$ linear, obeys the Leibniz rule and that $D$ has a local character.
In my notes (Smooth Manifolds by Looijenga) it is written that if $U' \subset U$, then we should have $D(f|U') = D(f)|U'$, where $|$ denotes the restriction. However, I cannot make sense of the left hand side of the equality, as $D$ only works on functions from $U$ to $\mathbb R$.
I would appreciate any help, to clarify the definition of a derivation being of local charakter.