ImageBitmap.js 716 B

12345678910111213141516171819202122232425262728293031
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  7. class ImageBitmap {
  8. constructor(width, height) {
  9. _defineProperty(this, "width", 0);
  10. _defineProperty(this, "height", 0);
  11. _defineProperty(this, "_closed", false);
  12. this.width = width;
  13. this.height = height;
  14. this.close = jest.fn(this.close.bind(this));
  15. }
  16. close() {
  17. this.width = 0;
  18. this.height = 0;
  19. this._closed = true;
  20. }
  21. }
  22. exports.default = ImageBitmap;