Why not use addEventListener() and its ilk to avoid having to capture old onfocus/blur methods? Also, you're not passing the event object from to handlers which could potentially break if they're expecting one.