本文整理匯總了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);
}
});