sb.removeEventListener

sb.removeEventListener(id)

Remove an event listener created with sb.addEventListener.

Parameters:
    id         An identifier returned from sb.addEventListener
Example:

function cbRedraw(context) {    
    print("redraw!");
}

//Create a listener to log redraw eventsvar 
lid = sb.addEventListener("gre.redraw", cbRedraw);  

// Remove the listener if it exists
if(lid != null) {    
    sb.removeEventListener(lid);
}
Was this article helpful?
0 out of 0 found this helpful