Open benlk opened 7 years ago
This bug is not appearing in 3.2.2's unminified version, if that helps.
Using the unminified version gets rid of the error, but AddToHomescreen never appears. Localstorage is being updated with
org.cubiq.addtohome {"lastDisplayTime":1480609920899,"returningVisitor":true,"displayCount":1,"optedout":false,"added":false}
Try using window.onload
when calling the script. I suspect you're getting the error because document.body
is still null
when the script is called.
This is what worked for me.
window.onload = function() {
addToHomescreen();
}
If that's the case, then the docs at http://cubiq.org/add-to-home-screen should be updated to put the addToHomescreen();
call in the footer.
Had the same issue. Placing <script> addToHomescreen();</script>
right after the <body>
tag seemed to work.
in
ath.Class.prototype
, in the functionshow
:this.container
is undefined, causing the following error:this.container
appears to be defined in the functionath.Class
:But the
this
is not the same, and sothis.container
is not shared in the context ofshow()