first commit

This commit is contained in:
monjack
2025-06-20 18:01:48 +08:00
commit 6daa6d65c1
24611 changed files with 2512443 additions and 0 deletions

View File

@ -0,0 +1,9 @@
var app = document.getElementById('app')
if (typeof Promise === 'undefined') {
// skip this test in IE
app.textContent = window.getCurrentScript().src
} else {
Promise.resolve().then(function() {
app.textContent = window.getCurrentScript().src
})
}

View File

@ -0,0 +1 @@
document.getElementById('app').textContent = window.getCurrentScript().src

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app"></div>
<script src="../index.js"></script>
<script src="./log-src-in-microtask.js"></script>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app"></div>
<script src="../index.js"></script>
<script src="./test-polyfill.js"></script>
</body>
</html>

View File

@ -0,0 +1,7 @@
if (!('currentScript' in document)) {
Object.defineProperty(document, 'currentScript', { get: window.getCurrentScript })
}
if (document.currentScript) {
document.getElementById('app').textContent = 'It works!'
}

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div id="app"></div>
<script src="../index.js"></script>
<script src="./log-src.js"></script>
</body>
</html>