aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/utils
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-08-01 01:26:15 +1000
committerSam Potts <sam@potts.es>2018-08-01 01:26:15 +1000
commitc8db1e55ddff51a1eb4ff08887cbed134116cd88 (patch)
treeb7929cefc5bf1da483a98b79b479b77986355c85 /src/js/utils
parent58079393e6463c0a72666aa974de92cb17f72fc2 (diff)
downloadplyr-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.js2
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,