The vertex shader uses the scene parameters defined by the attributes and uniforms to calculate $n$, $l$, and $v$, the inputs to the lighting model. Note, lighting calculations are done in eye space because this allows us to infer that the viewer sits at the origin.
As usual, don't forget to use gl.getUniformLocation, gl.uniformMatrix4f, gl.uniform3f, and gl.uniform4f in the application code to query the locations of each of these uniforms and give them a value.