Fix Android 4.4 (ArrayBuffer) by a shim

This commit is contained in:
Jean-Baptiste Dominguez 2018-07-03 11:23:43 +09:00
commit c5cabcd5bb
2 changed files with 12 additions and 0 deletions

11
src/shim/shim.js Normal file
View file

@ -0,0 +1,11 @@
//---------------------------------------------------------------------
//
// Add components what are missing in old JavaScript Engine
//
//---------------------------------------------------------------------
if (!ArrayBuffer['isView']) {
ArrayBuffer.isView = function(a) {
return a !== null && typeof(a) === "object" && a['buffer'] instanceof ArrayBuffer;
};
}