mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
@ -926,7 +926,7 @@ describe('NavController', () => {
|
|||||||
const MockView5 = 'mock-view5';
|
const MockView5 = 'mock-view5';
|
||||||
|
|
||||||
const mockWebAnimation = (el: HTMLElement) => {
|
const mockWebAnimation = (el: HTMLElement) => {
|
||||||
window.Animation = () => {};
|
Element.prototype.animate = () => {};
|
||||||
|
|
||||||
el.animate = () => {
|
el.animate = () => {
|
||||||
const animation = {
|
const animation = {
|
||||||
|
@ -42,7 +42,7 @@ export const createAnimation = () => {
|
|||||||
const _afterAddReadFunctions: any[] = [];
|
const _afterAddReadFunctions: any[] = [];
|
||||||
const _afterAddWriteFunctions: any[] = [];
|
const _afterAddWriteFunctions: any[] = [];
|
||||||
const webAnimations: any[] = [];
|
const webAnimations: any[] = [];
|
||||||
const supportsWebAnimations = (typeof (window as any).Animation === 'function');
|
const supportsWebAnimations = (typeof (Element as any) === 'function') && (typeof (Element as any).prototype!.animate === 'function');
|
||||||
const ANIMATION_END_FALLBACK_PADDING_MS = 100;
|
const ANIMATION_END_FALLBACK_PADDING_MS = 100;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script> <script>
|
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script> <script>
|
||||||
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
||||||
if (forceCSSAnimations) {
|
if (forceCSSAnimations) {
|
||||||
window.Animation = null;
|
Element.prototype.animate = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
class PageRoot extends HTMLElement {
|
class PageRoot extends HTMLElement {
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
||||||
if (forceCSSAnimations) {
|
if (forceCSSAnimations) {
|
||||||
window.Animation = null;
|
Element.prototype.animate = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
import { createAnimation } from '../../../../dist/index.mjs';
|
import { createAnimation } from '../../../../dist/index.mjs';
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
||||||
if (forceCSSAnimations) {
|
if (forceCSSAnimations) {
|
||||||
window.Animation = null;
|
Element.prototype.animate = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
import { createAnimation } from '../../../../dist/index.mjs';
|
import { createAnimation } from '../../../../dist/index.mjs';
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
||||||
if (forceCSSAnimations) {
|
if (forceCSSAnimations) {
|
||||||
window.Animation = null;
|
Element.prototype.animate = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
import { createAnimation } from '../../../../dist/index.mjs';
|
import { createAnimation } from '../../../../dist/index.mjs';
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
||||||
if (forceCSSAnimations) {
|
if (forceCSSAnimations) {
|
||||||
window.Animation = null;
|
Element.prototype.animate = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
import { createAnimation } from '../../../../dist/index.mjs';
|
import { createAnimation } from '../../../../dist/index.mjs';
|
||||||
|
@ -11,9 +11,12 @@
|
|||||||
<script src="../../../../../scripts/testing/scripts.js"></script>
|
<script src="../../../../../scripts/testing/scripts.js"></script>
|
||||||
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
|
<script nomodule src="../../../../../dist/ionic/ionic.js"></script>
|
||||||
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
|
<script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
window.Animation = null;
|
const forceCSSAnimations = new URLSearchParams(window.location.search).get('ionic:_forceCSSAnimations');
|
||||||
|
if (forceCSSAnimations) {
|
||||||
|
Element.prototype.animate = null;
|
||||||
|
}
|
||||||
|
|
||||||
import { createAnimation } from '../../../../dist/index.mjs';
|
import { createAnimation } from '../../../../dist/index.mjs';
|
||||||
|
|
||||||
createAnimation()
|
createAnimation()
|
||||||
|
Reference in New Issue
Block a user