Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-18-2003, 08:42 PM   PM User | #1
Choopernickel
Regular Coder

 
Join Date: Apr 2003
Location: Atlanta, GA
Posts: 487
Thanks: 0
Thanked 0 Times in 0 Posts
Choopernickel is an unknown quantity at this point
keypress event in DOM?

DOM2 does not provide a key event module. That's fine. I'm down with that.

According to the DOM3 Events spec (in last call), there's no keyPress event, only keyDown and keyUp. Instead (I guess) they've defined a new interface for text events, which provides one event type: textInput.

Should I not code event handlers for keyPress events if I wish to write DOM-compliant scripts? IE & Moz both register a keyPress; I'm sure that it won't be outphased. I worry instead about a new and better browser appearing and balking on my script because it's coded exactly to spec.

Thoughts? Opinions?
Choopernickel is offline   Reply With Quote
Old 06-19-2003, 12:28 AM   PM User | #2
jkd
Senior Coder

 
jkd's Avatar
 
Join Date: May 2002
Location: metro DC
Posts: 3,163
Thanks: 1
Thanked 18 Times in 18 Posts
jkd will become famous soon enough
Well, you're going to have to keep using keypress for a while. And then would "Uberbrowser 1.0" (when released) support non-DOM3 events? I'd say so. Mozilla supports quite a few non-DOM2 Events, and even has it's own, entirely proprietary, KeyEvent interface to make up for DOM2's lack of one.

And if not, it shouldn't take more than 10 minutes to update a script already friendly to the DOM to use the textInput event. It looks as though it should simplify most of them anyway, cutting that keyCode/charCode crap.
__________________
jasonkarldavis.com
jkd is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:36 PM.


Advertisement
Log in to turn off these ads.