Merge pull request #998 from novnc/bug/ie11-tests-slice

Fix slice usage in display tests on IE11
This commit is contained in:
Solly Ross 2018-01-10 12:48:16 -05:00 committed by GitHub
commit ef8805cfa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -354,7 +354,8 @@ describe('Display/Canvas Helper', function () {
for (let x = 0;x < 16;x++) {
let pixel;
if ((x < 4) && (y < 4)) {
pixel = checked_data.slice((y*4+x)*4, (y*4+x+1)*4);
// NB: of course IE11 doesn't support #slice on ArrayBufferViews...
pixel = Array.prototype.slice.call(checked_data, (y*4+x)*4, (y*4+x+1)*4);
} else {
pixel = [0, 0xff, 0, 255];
}