KeyboardEvent()

Le constructeur KeyboardEvent() crée un nouveau KeyboardEvent.

Syntaxe

js
event = new KeyboardEvent(typeArg, KeyboardEventInit);

Valeurs

typeArg

Une représentation du nom de l'évènement sous forme de DOMString.

KeyboardEventInitFacultatif

Un dictionnaire KeyboardEventInit ayant les champs suivants :

Note : Le dictionnaire KeyboardEventInit accepte aussi les champs des dictionnaires UIEventInit (en-US) et EventInit.

Spécifications

Specification
UI Events
# dom-keyboardevent-keyboardevent

Compatibilité des navigateurs

BCD tables only load in the browser

Voir aussi