mirror of
https://github.com/novnc/noVNC.git
synced 2026-06-03 10:59:39 +00:00
Avoid TypedArray.slice() because of IE11
This commit is contained in:
@@ -100,11 +100,10 @@ Websock.prototype = {
|
||||
|
||||
rQshiftStr: function (len) {
|
||||
if (typeof(len) === 'undefined') { len = this.rQlen(); }
|
||||
const arr = this.rQshiftBytes(len);
|
||||
let str = "";
|
||||
// Handle large arrays in steps to avoid long strings on the stack
|
||||
for (let i = 0; i < len; i += 4096) {
|
||||
let part = arr.slice(i, Math.min(i + 4096, len));
|
||||
let part = this.rQshiftBytes(Math.min(4096, len - i));
|
||||
str += String.fromCharCode.apply(null, part);
|
||||
}
|
||||
return str;
|
||||
|
||||
Reference in New Issue
Block a user