DomHandler hasCSSAnimation and hasCSSTransition added
parent
5455aa896b
commit
c7c71e213f
|
@ -705,6 +705,28 @@ export default {
|
||||||
return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hasCSSAnimation(element) {
|
||||||
|
if (element) {
|
||||||
|
const style = getComputedStyle(element);
|
||||||
|
const animationDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');
|
||||||
|
|
||||||
|
return animationDuration > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
|
hasCSSTransition(element) {
|
||||||
|
if (element) {
|
||||||
|
const style = getComputedStyle(element);
|
||||||
|
const transitionDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');
|
||||||
|
|
||||||
|
return transitionDuration > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
|
||||||
exportCSV(csv, filename) {
|
exportCSV(csv, filename) {
|
||||||
let blob = new Blob([csv], {
|
let blob = new Blob([csv], {
|
||||||
type: 'application/csv;charset=utf-8;'
|
type: 'application/csv;charset=utf-8;'
|
||||||
|
|
|
@ -60,6 +60,8 @@ export declare class DomHandler {
|
||||||
static isIOS(): boolean;
|
static isIOS(): boolean;
|
||||||
static isAndroid(): boolean;
|
static isAndroid(): boolean;
|
||||||
static isTouchDevice(): boolean;
|
static isTouchDevice(): boolean;
|
||||||
|
static hasCSSAnimation(el: HTMLElement): boolean;
|
||||||
|
static hasCSSTransition(el: HTMLElement): boolean;
|
||||||
static exportCSV(csv: any, filename: string): void;
|
static exportCSV(csv: any, filename: string): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue