您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

functions.js 495B

12345678910111213141516171819202122
  1. // @flow
  2. let filterSupport;
  3. /**
  4. * Checks context filter support.
  5. *
  6. * @returns {boolean} True if the filter is supported and false if the filter is not supported by the browser.
  7. */
  8. export function checkBlurSupport() {
  9. if (typeof filterSupport === 'undefined') {
  10. const canvas = document.createElement('canvas');
  11. const ctx = canvas.getContext('2d');
  12. filterSupport = typeof ctx.filter !== 'undefined';
  13. canvas.remove();
  14. }
  15. return filterSupport;
  16. }