i have this code
Self.ExecuteJavaScript("if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var coords = position.coords.latitude + ',' + position.coords.longitude; if (typeof Xojo !== 'undefined') { Xojo.triggerServerEvent('LocationReceived', coords, false); } else { console.error('Xojo framework not ready'); } }, function(error) { if (typeof Xojo !== 'undefined') { Xojo.triggerServerEvent('LocationFallback', '', false); } else { console.error('Xojo framework not ready on fallback'); } }); } else { if (typeof Xojo !== 'undefined') { Xojo.triggerServerEvent('LocationFallback', '', false); } else { console.error('Xojo framework not ready on no geolocation'); } }")
that should trigger server events. Whether I run this from Opening Session or From Shown on the WebPage, I still get “Xojo Framework not ready” instead. What might be causing this?