summaryrefslogtreecommitdiff
path: root/core/util/polyfill.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/util/polyfill.js')
-rw-r--r--core/util/polyfill.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/util/polyfill.js b/core/util/polyfill.js
index 648ceeb..0e458c8 100644
--- a/core/util/polyfill.js
+++ b/core/util/polyfill.js
@@ -1,6 +1,6 @@
/*
* noVNC: HTML5 VNC client
- * Copyright (C) 2018 The noVNC Authors
+ * Copyright (C) 2020 The noVNC Authors
* Licensed under MPL 2.0 or any later version (see LICENSE.txt)
*/
@@ -52,3 +52,10 @@ if (typeof Object.assign != 'function') {
window.CustomEvent = CustomEvent;
}
})();
+
+/* Number.isInteger() (taken from MDN) */
+Number.isInteger = Number.isInteger || function isInteger(value) {
+ return typeof value === 'number' &&
+ isFinite(value) &&
+ Math.floor(value) === value;
+};