while layer.onclick set to null in the handler, but the handler still execute.
Opened this issue · 0 comments
borenXue commented
while my code is below, the handler will execute multiple times.
But In fact, I only need to execute it once
document.addEventListener('DOMContentLoaded', function() {
document.body.onclick = function () {
// do something
document.body.onclick = null
}
FastClick.attach(document.body);
}, false);