what browser is document.layers sniffing?

Posted by mkoryak on Stack Overflow See other posts from Stack Overflow or by mkoryak
Published on 2010-01-13T20:48:38Z Indexed on 2010/04/23 18:33 UTC
Read the original article Hit count: 426

I am looking at some JS code from the 20th century, and they are using document.layers in code that is trying to get the current key code. What browser are they sniffing for?

i am about to replace the code with something like this:

var fn = function(event){
  event = event || window.event;
  var code = event.charCode || event.keyCode;
}

but i am afraid of breaking something arcane and releasing the evil

© Stack Overflow or respective owner

Related posts about browser-sniffing

Related posts about JavaScript