debugger.js 820 B

12345678910111213141516171819202122232425
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.isDebugging = void 0;
  4. var elementDebuggerAttribute = 'data-html2canvas-debug';
  5. var getElementDebugType = function (element) {
  6. var attribute = element.getAttribute(elementDebuggerAttribute);
  7. switch (attribute) {
  8. case 'all':
  9. return 1 /* ALL */;
  10. case 'clone':
  11. return 2 /* CLONE */;
  12. case 'parse':
  13. return 3 /* PARSE */;
  14. case 'render':
  15. return 4 /* RENDER */;
  16. default:
  17. return 0 /* NONE */;
  18. }
  19. };
  20. var isDebugging = function (element, type) {
  21. var elementType = getElementDebugType(element);
  22. return elementType === 1 /* ALL */ || type === elementType;
  23. };
  24. exports.isDebugging = isDebugging;
  25. //# sourceMappingURL=debugger.js.map