I have the following theorem from the book "Applied Analaysis" by Hunters.
Suppose that $x_n$ is a sequence in a Hilbert space $H$ and $D$ is a dense subset of $H$. Then, $<x_n,y>$ converges to $<x,y>$ for every $y\in H$ iff $\|x_n\|\leq M$ for some constant $M$ and $<x_n,z>$ converges to $<x,z>$ for $z\in D$.
Then, as an illustration of this theorem, the author says that:
If $\{u_{\alpha}\}$ is an orthonormal basis of a Hilbert space, then a sequence $x_n$ converges weakly to $x$ if and only if it is bounded and its coordinate converges, that is, $<x_n,u_{\alpha}> \to <x,u_{\alpha}>$
But, I do not understand this example because an orthonormal basis is not dense in a Hilbert space. What am I missing?