A javascript command sender and handler