Model MessageEvent as generic (parametric `data`, `source`, and `ports`)
Over at #5018 a user was attempting to use an intersection type to specify the data parameter of a MessageEvent. The data property should be parametrized. The source and ports properties on MessageEvent also warrant parametrization. This PR remodels MessageEvent and its uses with generics.
I expect that it will break a lot of typed code, but the transition should happen at some point. Unfortunately I had a lot of difficulty in finding per-use specs for the source and ports properties. I suspect some variation across browsers, but the remodelling is correct for Chromium. I'd appreciate any input to nail it down with more confidence.
This looks pretty reasonable. Again, I'd like to apologize for the long response time here.
I'd like to see how this affects our main internal codebases. When you get a chance, could you rebase, I'll import, and then we can go from there?
Also, do you think it would be reasonable to have defaults for these type parameters, so that people could use MessageEvent<> if they would like to retain the current behavior?
Don't worry about re-recording the tests, I can deal with that after I import.