ChunYu Wang
2018-08-23 14:22:39 UTC
Suppose we have a very simple page:
<!DOCTYPE html>
<html lang="en">
<body>
<p>Hello There</p>
</body>
<script>
document.body.onload = function() {
console.log("onload")
}
document.addEventListener("DOMContentLoaded", function() {
console.log("DOMContentLoaded");
});
console.log(document.body)
document.body.innerHTML = ''
</script>
</html>
According to the console output, the document.body has been set
before DOMContentLoaded, also the "Hello There" seems never been rendered
to the viewport.
Please give me some hints or implementation ideas, since it is really hard
for me to find some identified materials which could be applied for this
case.
Thanks,
ChunYu.
<!DOCTYPE html>
<html lang="en">
<body>
<p>Hello There</p>
</body>
<script>
document.body.onload = function() {
console.log("onload")
}
document.addEventListener("DOMContentLoaded", function() {
console.log("DOMContentLoaded");
});
console.log(document.body)
document.body.innerHTML = ''
</script>
</html>
According to the console output, the document.body has been set
before DOMContentLoaded, also the "Hello There" seems never been rendered
to the viewport.
Please give me some hints or implementation ideas, since it is really hard
for me to find some identified materials which could be applied for this
case.
Thanks,
ChunYu.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss
---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.