B4J Question [BANano] How to get all events linked to an element?

Discussion in 'B4J Questions' started by Mashiane, Apr 22, 2019.

  1. Mashiane

    Mashiane Expert Licensed User


    I'm trying to debug my app as its not firing any of the assigned events. How can I get a listing of all events linked to an element using BANano?

    I have found this on stack-overflow..

    function getEvents(element) {
        var elemEvents = $._data(element, 
        var allDocEvnts = $._data(document, 
    for(var evntType in allDocEvnts) {
    if(allDocEvnts.hasOwnProperty(evntType)) {
                var evts = allDocEvnts[evntType];
    for(var i = 0; i < evts.length; i++) {
    if($(element).is(evts[i].selector)) {
    if(elemEvents == null) {
                            elemEvents = {
                        if(!elemEvents.hasOwnProperty(evntType)) {
                            elemEvents[evntType] = [];
        return elemEvents;

    Not tested though... Do we have an equivalent for BANano?
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice