Safari 8.0.6 - TypeError: null is not an object (evaluating 'document.body.setAttribute') #289
Comments
What version of grunticon are you using? What's your callback? |
I’m having the same issue in Safari 8.0.8 (OS X 10.10.5), running grunticon 2.2.1. Callback’s set to |
In your |
Sorry for the delay in replying. Grunticon 2.2.1 I've confirmed that I am using the exact same code as the generated grunticon.loader.js |
@PJL101 It works placing it in the bottom of the body because I think the error is that your body is not defined when the .js code is executed. I think you should put the code so it executes after the elements are defined, either with a DOM ready callback or place the source under the elements in the HTML. |
@benjgorman It was my assumption that the loader & call was placed inlined in the head for performance reasons? If this is not true I'll keep the same as what I have done, loader in head and call at bottom of body. |
@PJL101 that's probably true, you'd need one of the developers to confirm it though, I'm not certain. |
Sorry all, swamped and hoping to get to this soon. |
Not sure what happened, but the issue seems to have resolved itself: at @johnbender’s request, I returned the loader to its original position in the Not sure what might have caused the race condition. I’ll report back if I can come up with a better test case, but for now everything seems to WFM. |
@benjgorman @PJL101 @beep I'm going to close this for now, though I don't feel particularly confident in doing so which means we should definitely reopen this if you can help me reproduce the issue. As a side note there are no |
If I get a decent test case, I’ll report back. Thanks! |
@johnbender I can try and produce a test case. I noticed grunt icon has been updated to 2.2.2 so I'll retest with the new version. |
Hi,
I'm having an issue with Safari 8.0.6/OSX 10.10.5 where grunticons won't display and the above error is in the console.
Unfortunately, I'm having problems producing a workable test case but I noticed this live website is doing it and looks to be using the same configuration as mine: http://benjgorman.com
Weirdly on my project, the preview.html is fine and I have checked that the preview.html and my website code is the same.
I have worked around this by putting the grunticon load line at the bottom of the body for the time being.
The text was updated successfully, but these errors were encountered: