aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/utils/is.js
diff options
context:
space:
mode:
authorSam Potts <sam@potts.es>2018-08-02 00:47:57 +1000
committerGitHub <noreply@github.com>2018-08-02 00:47:57 +1000
commit18b4d26bee07e1d1079e39ded8a30eaed8b02ff9 (patch)
tree8456332396352cce0afa3f9f598d2ffb11fdc0f6 /src/js/utils/is.js
parentfa0861ff2e9b22e361ada7b1fb9ff45c0378464e (diff)
parent7f4b74e2d43ed95a695f760f48e5b8e0792f9528 (diff)
downloadplyr-18b4d26bee07e1d1079e39ded8a30eaed8b02ff9.tar.lz
plyr-18b4d26bee07e1d1079e39ded8a30eaed8b02ff9.tar.xz
plyr-18b4d26bee07e1d1079e39ded8a30eaed8b02ff9.zip
Merge pull request #1142 from sampotts/a11y-improvements
A11y improvements
Diffstat (limited to 'src/js/utils/is.js')
-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,