I have a api code below the problem I have; is I can start eventlistener but cant remove it so I wonder if I can remove all eventlistener in a div area to stop that event listener?
api.scene.addEventListener(api.scene.EVENTTYPE.SUBSCENE_PUBLISHED, myFunctionpicbir) = WORK;
api.scene.removeEventListener(api.scene.EVENTTYPE.SUBSCENE_PUBLISHED, myFunctionpicbir) = NOT WORK;
( so in spite of that code I want to remove all eventlistener in spesific div area)
api.scene.addEventListener(api.scene.EVENTTYPE.SUBSCENE_PUBLISHED, myFunctionpicbir);
function myFunctionpicbir() {
alert("1")
setTimeout(function() {
html2canvas($('#sdv-container-sky')[0], {
x: 500,
y: 0,
height: 600,
width: 900
}).then(function(canvas) {
document.getElementById('kumas_cizim').appendChild(canvas);
api.scene.removeEventListener(api.scene.EVENTTYPE.SUBSCENE_PUBLISHED, myFunctionpicbir);
myFunctiona();
}, 1500);
})
also I asked a question about that api here :