This is an old question but it still shows up when I google "webgl integer attribute" so I'll add an updated answer.
This is now possible using WebGL2:
// In your shader
in int index;
// In your JS, instead of calling vertexAttribPointer
gl.vertexAttribIPointer(...);
Note the I (for integer) in vertexAttribIPointer. Here are the MDN docs:
https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/vertexAttribIPointer
Many thanks to this other StackOverflow answer, which goes into more detail: