zone-patch-canvas.umd.js 867 B

12345678910111213141516171819202122232425
  1. 'use strict';
  2. /**
  3. * @license Angular v<unknown>
  4. * (c) 2010-2025 Google LLC. https://angular.io/
  5. * License: MIT
  6. */
  7. (function (factory) {
  8. typeof define === 'function' && define.amd ? define(factory) :
  9. factory();
  10. })((function () {
  11. 'use strict';
  12. function patchCanvas(Zone) {
  13. Zone.__load_patch('canvas', function (global, Zone, api) {
  14. var HTMLCanvasElement = global['HTMLCanvasElement'];
  15. if (typeof HTMLCanvasElement !== 'undefined' &&
  16. HTMLCanvasElement.prototype &&
  17. HTMLCanvasElement.prototype.toBlob) {
  18. api.patchMacroTask(HTMLCanvasElement.prototype, 'toBlob', function (self, args) {
  19. return { name: 'HTMLCanvasElement.toBlob', target: self, cbIdx: 0, args: args };
  20. });
  21. }
  22. });
  23. }
  24. patchCanvas(Zone);
  25. }));