09-30-2012 05:26 PM
I am not able to get the top bezel swipe action to register on the Dev Alpha for any of my apps. I have tried everything that I have found on these boards and on github.
I tried the sample WebWorks project swipemenu.js at https://github.com/blackberry/WebWorks-Samples/tre
I have added the BB10 the <feature id="blackberry.app" /> tag to my config file. I placed the following in my apps <head> section (found here - https://developer.blackberry.com/html5/apis/blackb
<script type="text/javascript">
function onSwipedown() {
alert("Swipe down event occurred.");
}
blackberry.event.addEventListener("swipedown", onSwipedown);
</script>
But I never see the alert, now matter how I try the top bezel swipe.
I am also placing the WebWorks javascript file (webworks-1.0.2.9.js) in my app.
I am not using the BBUI.js for this app as it causes too many conflicts at this time. Is there someone who has got the top bezel swipe to work in a BB10 WebWorks app on a Dev Alpha device.
OS Version: 10.0.9.338
BlackBerry 10 WebWorks SDK 1.0.2.9
Solved! Go to Solution.
09-30-2012 05:45 PM
you need to wait for the webworks ready event and then register.
https://developer.blackberry.com/html5/documentati
<script> function ready() { //register for swipe down here } window.addEventListener("load", function(e) { document.addEventListener("webworksready", ready); }, false); </script>