javascript: added required decl for browsers