zone-patch-canvas.js 558 B

123456789101112131415
  1. 'use strict';
  2. /**
  3. * @license Angular v<unknown>
  4. * (c) 2010-2022 Google LLC. https://angular.io/
  5. * License: MIT
  6. */
  7. Zone.__load_patch('canvas', (global, Zone, api) => {
  8. const HTMLCanvasElement = global['HTMLCanvasElement'];
  9. if (typeof HTMLCanvasElement !== 'undefined' && HTMLCanvasElement.prototype &&
  10. HTMLCanvasElement.prototype.toBlob) {
  11. api.patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', (self, args) => {
  12. return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
  13. });
  14. }
  15. });