-
-
Save 1uokun/832b3210dbeb94aca152a73f536ace76 to your computer and use it in GitHub Desktop.
<script defer async>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log(a) | |
document.addEventListener('DOMContentLoaded', function(event) { | |
console.log("DOMContentLoaded in serve"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="zh"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>script defer&async</title> | |
</head> | |
<body> | |
<img src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_92x30dp.png?asd=123" alt=""> | |
<script src="http://ip/1.js" defer></script> | |
<script> | |
document.addEventListener('DOMContentLoaded', function(event) { | |
console.log("DOMContentLoaded in local"); | |
}); | |
window.addEventListener('load', function(event) { | |
console.log("load"); | |
}); | |
window.a = '1uokun' | |
</script> | |
<code> | |
log order: | |
1uokun | |
DOMContentLoaded in local | |
DOMContentLoaded in serve | |
load | |
</code> | |
<mark> | |
that I can use this props in Vue/React | |
</mark> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment