Since we have the assignment in both branches, can't we just write:

```javascript
handler = selector ? function (e) {
  var node = e.target || e.srcElement;
  for (; node && node != root; node = node.parentNode) {
    if (matchesSelector.call(node, selector)) {
      e.delegateTarget = node;
      return method.apply(this, arguments);
    }
  }
} : method;
```

Or the other way around (`handler = !selector ? method : function (e)`) if you prefer the negative condition or "optimise" for the common case.

I'm also ranting about the no braces `if` with an `else`, but it may be just me not liking them :smile: