Adding DOM access to new character information

This commit is contained in:
joki%netscape.com 1999-03-11 00:07:59 +00:00
parent 1d2db0ce5c
commit 2874bb3300
2 changed files with 18 additions and 2 deletions

View File

@ -221,7 +221,15 @@ NS_METHOD nsDOMEvent::SetMetaKey(PRBool aMetaKey)
NS_METHOD nsDOMEvent::GetCharCode(PRUint32* aCharCode)
{
return NS_ERROR_NOT_IMPLEMENTED;
switch (mEvent->message) {
case NS_KEY_UP:
case NS_KEY_DOWN:
*aCharCode = ((nsKeyEvent*)mEvent)->charCode;
break;
default:
return NS_ERROR_FAILURE;
}
return NS_OK;
}
NS_METHOD nsDOMEvent::SetCharCode(PRUint32 aCharCode)

View File

@ -221,7 +221,15 @@ NS_METHOD nsDOMEvent::SetMetaKey(PRBool aMetaKey)
NS_METHOD nsDOMEvent::GetCharCode(PRUint32* aCharCode)
{
return NS_ERROR_NOT_IMPLEMENTED;
switch (mEvent->message) {
case NS_KEY_UP:
case NS_KEY_DOWN:
*aCharCode = ((nsKeyEvent*)mEvent)->charCode;
break;
default:
return NS_ERROR_FAILURE;
}
return NS_OK;
}
NS_METHOD nsDOMEvent::SetCharCode(PRUint32 aCharCode)