Close GH-862: Vanilla js improvements.