added textarea support and catch querySelector errors
added textarea support and catch querySelector errors