Update to javascript events