Primarily it allows you to abandon onpress events that have cross-browser incompatible behavior and that are to be deprecated in favor of beforeinput events in W3C DOM4.
Primarily it allows you to abandon onpress events that have cross-browser incompatible behavior and that are to be deprecated in favor of beforeinput events in W3C DOM4. Calling polyfill method on keydown/keyup event gives you normalized keyCode across platforms and browsers and estimated charCode in case of a key representing printable character. pfKeyCode & optional pfCharCode properties are added to Event object for possible latter use