This code copies over the data from the event structure as-is. The logic in Browser.calculateMouseEvent is something that's a bit assuming an use case - i.e. touch ID 0 emulates a mouse, pointer is always relative to canvas. I'd rather keep it plain and present the event data as it comes, and later on if it looks like there are some common operations that always need to be done (fix up scroll offsets, offer high-DPI or zoom -aware computations), then offer those as extended member elements on the event struct, but still not mutate the original data (unless the original data is just broken).