question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<h:body onload/> does not work on FF in 10.0.3 - Probably related to #7395

See original GitHub issue

With PF 10.0.3 onload events on <h:body/> are not executed in FF (89.02) any longer. - on Chrome and Edge it works fine. In 10.0.2 it worked on FF as well.

Example: …

<h:body onload="console.log('Here I am')">
... content ..
</h:body>

On Chrome, and Edge, the ‘onload’-js will be executed - on FF not.

Taking a look at the rendered HTML, you see that it is different on FF compared to the other browsers.

EDGE, Chrome:

<body onload="console.log('Here I am')">
..content ..
</body>

FF:

<body>
<script>/*FIREFOX_FOUC_FIX*/</script>
<div onload="console.log('Here I am')">
</div>
.. content..
</body>

Suppose the support of the ‘onload’ method in the ‘div’ tag may not be standard.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
wlhUsercommented, Jun 28, 2021

@wlhUser 10.0.4 released please try with it. The issue should be resolved.

Have tested with 10.0.4. The issue does not occur any more - works fine. Thanks for the quick fix.

0reactions
mellowarecommented, Jun 28, 2021

@tandraschko I have tested and I am good with your fix. Even for 2) above it fixes the issue because there is a script in the body it still prevents the flickering because the DevTools must know they need to wait for a script to run! Not sure if you want to close this issue or not?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is the Body Onload not work with function - Stack Overflow
When it says that the function is not definied, this normally means, that the javascript where you declare the function has to be...
Read more >
I'm trying to imlement <body onload=' location.href="#tab1 ...
Is the problem that the script doesn't run (starting at some point after refresh), or it doesn't scroll to the correct location in...
Read more >
Onload not firing on Chrome for Windows | WordPress.org
Hello,. I'm having a an issue, where the onload JavaScript is not firing on Chrome for Windows, while it works on Firefox and...
Read more >
onLoad does not work in mozilla - SAP Community
This code works in IE but the initialize function is not getting triggered in Mozilla Firefox, I am on version 3.6.13. Any inputs...
Read more >
onload Event - W3Schools
Definition and Usage. The onload event occurs when an object has been loaded. onload is most often used within the <body> element to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found