We pass null to pjax:start/end because they might fire in the context of an xhr request, but they can also fire on popstate where there is no xhr object. The handler method should check if xhr truthy or not before consuming the xhr object.

Here the scenario is slighly different. In the first case, I would pass the `container` object to `pjax:beforeReplace` so that the event handler could potential manipulate the `container` object.

But, if we do that, then we would have to pass a similar object to `pjax:beforeReplace` on popstate, but we don't have such an object. So in both cases, we could pass the raw content as the 1st argument (`container.contents` in the first case, `contents` in the second)