diff --git a/.eslintrc.js b/.eslintrc.js
index 49846c1f5e9bc..c1eb5b34ebe82 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -579,6 +579,7 @@ module.exports = {
JSONValue: 'readonly',
JSResourceReference: 'readonly',
MouseEventHandler: 'readonly',
+ NavigateEvent: 'readonly',
PropagationPhases: 'readonly',
PropertyDescriptor: 'readonly',
React$AbstractComponent: 'readonly',
@@ -634,5 +635,6 @@ module.exports = {
AsyncLocalStorage: 'readonly',
async_hooks: 'readonly',
globalThis: 'readonly',
+ navigation: 'readonly',
},
};
diff --git a/fixtures/flight/src/actions.js b/fixtures/flight/src/actions.js
index aa19871a9dcbb..0b9b9c315d647 100644
--- a/fixtures/flight/src/actions.js
+++ b/fixtures/flight/src/actions.js
@@ -2,7 +2,13 @@
import {setServerState} from './ServerState.js';
+async function sleep(ms) {
+ return new Promise(resolve => setTimeout(resolve, ms));
+}
+
export async function like() {
+ // Test loading state
+ await sleep(1000);
setServerState('Liked!');
return new Promise((resolve, reject) => resolve('Liked'));
}
@@ -20,5 +26,7 @@ export async function greet(formData) {
}
export async function increment(n) {
+ // Test loading state
+ await sleep(1000);
return n + 1;
}
diff --git a/fixtures/view-transition/src/components/Page.js b/fixtures/view-transition/src/components/Page.js
index 9744313c4f5ea..db2cd0aff08c7 100644
--- a/fixtures/view-transition/src/components/Page.js
+++ b/fixtures/view-transition/src/components/Page.js
@@ -18,6 +18,10 @@ import './Page.css';
import transitions from './Transitions.module.css';
+async function sleep(ms) {
+ return new Promise(resolve => setTimeout(resolve, ms));
+}
+
const a = (
@@ -106,7 +110,13 @@ export default function Page({url, navigate}) {
document.body
)
) : (
-