es.array-buffer.constructor.js 575 B

1234567891011121314151617
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var global = require('../internals/global');
  4. var arrayBufferModule = require('../internals/array-buffer');
  5. var setSpecies = require('../internals/set-species');
  6. var ARRAY_BUFFER = 'ArrayBuffer';
  7. var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];
  8. var NativeArrayBuffer = global[ARRAY_BUFFER];
  9. // `ArrayBuffer` constructor
  10. // https://tc39.es/ecma262/#sec-arraybuffer-constructor
  11. $({ global: true, constructor: true, forced: NativeArrayBuffer !== ArrayBuffer }, {
  12. ArrayBuffer: ArrayBuffer
  13. });
  14. setSpecies(ARRAY_BUFFER);