An extension methods to simplify javascript.