本文整理汇总了TypeScript中vs/base/browser/browser.hasCSSAnimationSupport函数的典型用法代码示例。如果您正苦于以下问题:TypeScript hasCSSAnimationSupport函数的具体用法?TypeScript hasCSSAnimationSupport怎么用?TypeScript hasCSSAnimationSupport使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了hasCSSAnimationSupport函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: test
test('all', function () {
assert(!(isWindows && isMacintosh));
var isOpera = browser.isOpera || navigator.userAgent.indexOf('OPR') >= 0;
var isIE11orEarlier = browser.isIE11orEarlier;
var isFirefox = browser.isFirefox;
var isWebKit = browser.isWebKit;
var isChrome = browser.isChrome;
var isSafari = browser.isSafari;
var canPushState = browser.canPushState();
var hasCSSAnimations = browser.hasCSSAnimationSupport();
var browserCount = 0;
if (isOpera) {
browserCount++;
assert(canPushState);
}
if (isIE11orEarlier) {
browserCount++;
}
if (isFirefox) {
browserCount++;
assert(canPushState);
assert(hasCSSAnimations);
}
if (isWebKit) {
browserCount++;
assert(canPushState);
assert(hasCSSAnimations);
}
if (isChrome) {
browserCount++;
assert(canPushState);
assert(hasCSSAnimations);
}
if (isSafari) {
browserCount++;
assert(canPushState);
assert(hasCSSAnimations);
}
var canPlayMp3 = browser.canPlayAudio('audio/mpeg');
var canPlayMp4 = browser.canPlayVideo('video/mp4');
if ((isIE11orEarlier || isChrome) && !isOpera) {
assert(canPlayMp3);
assert(canPlayMp4);
}
});
示例2: test
test('all', function () {
assert(!(isWindows && isMacintosh));
let isOpera = browser.isOpera || navigator.userAgent.indexOf('OPR') >= 0;
let isIE = browser.isIE;
let isFirefox = browser.isFirefox;
let isWebKit = browser.isWebKit;
let isChrome = browser.isChrome;
let isSafari = browser.isSafari;
let hasCSSAnimations = browser.hasCSSAnimationSupport();
let browserCount = 0;
if (isOpera) {
browserCount++;
}
if (isIE) {
browserCount++;
}
if (isFirefox) {
browserCount++;
assert(hasCSSAnimations);
}
if (isWebKit) {
browserCount++;
assert(hasCSSAnimations);
}
if (isChrome) {
browserCount++;
assert(hasCSSAnimations);
}
if (isSafari) {
browserCount++;
assert(hasCSSAnimations);
}
});