diff options
author | Sam Potts <sam@potts.es> | 2018-08-01 01:26:15 +1000 |
---|---|---|
committer | Sam Potts <sam@potts.es> | 2018-08-01 01:26:15 +1000 |
commit | c8db1e55ddff51a1eb4ff08887cbed134116cd88 (patch) | |
tree | b7929cefc5bf1da483a98b79b479b77986355c85 /src/js/utils | |
parent | 58079393e6463c0a72666aa974de92cb17f72fc2 (diff) | |
download | plyr-c8db1e55ddff51a1eb4ff08887cbed134116cd88.tar.lz plyr-c8db1e55ddff51a1eb4ff08887cbed134116cd88.tar.xz plyr-c8db1e55ddff51a1eb4ff08887cbed134116cd88.zip |
Escape closes menu
Diffstat (limited to 'src/js/utils')
-rw-r--r-- | src/js/utils/is.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/js/utils/is.js b/src/js/utils/is.js index b4760da4..2952d486 100644 --- a/src/js/utils/is.js +++ b/src/js/utils/is.js @@ -16,6 +16,7 @@ const isNodeList = input => instanceOf(input, NodeList); const isElement = input => instanceOf(input, Element); const isTextNode = input => getConstructor(input) === Text; const isEvent = input => instanceOf(input, Event); +const isKeyboardEvent = input => instanceOf(input, KeyboardEvent); const isCue = input => instanceOf(input, window.TextTrackCue) || instanceOf(input, window.VTTCue); const isTrack = input => instanceOf(input, TextTrack) || (!isNullOrUndefined(input) && isString(input.kind)); @@ -56,6 +57,7 @@ export default { element: isElement, textNode: isTextNode, event: isEvent, + keyboardEvent: isKeyboardEvent, cue: isCue, track: isTrack, url: isUrl, |