I had checked with few tests. It is generated before `ready` event. But I can't find any document about this. I think your suggestion is better. It may be buggy if we dispatch `upgradeend` event depending on an uncertain thing. I will remove that.