Open studioTeaTwo opened 1 week ago
I am going to use it in the case of multiple nodes and the repetition of node.append/node.remove. This can cause problems because removeEventListener can not properly find the corresponding Listeners, leaving Listeners referencing the removed Node.
node.append/node.remove
removeEventListener
Current core code is:
const listen = addEventListener; listen('pointerdown', drag_start, false); listen('pointerup', drag_end, false); listen('pointermove', drag, false);
I think it's better:
const listen = node.addEventListener; listen('pointerdown', drag_start, false); listen('pointerup', drag_end, false); listen('pointermove', drag, false);
I am going to use it in the case of multiple nodes and the repetition of
node.append/node.remove
. This can cause problems becauseremoveEventListener
can not properly find the corresponding Listeners, leaving Listeners referencing the removed Node.Current core code is:
I think it's better: