It is useful to add a check whether the element is present or not in the delegate method. `function delegate(element, selector, type, callback, useCapture) { if (element === null) return;`