mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-18 15:02:09 +00:00
27 lines
547 B
HTML
27 lines
547 B
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="zh-cn">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>AsyncTest</title>
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
</head>
|
|
|
|
<body>
|
|
<script>
|
|
async function fun1() {
|
|
return new Promise(resolve => {
|
|
setTimeout(() => {
|
|
resolve('resolve');
|
|
}, 1000);
|
|
});
|
|
}
|
|
|
|
fun1().then(obj => {
|
|
console.log(obj);
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |