Doable?
Sure, but depending on when you get here, as there's a bank of wide bodies that arrive and if you are on a foreign passport it could take a long time to enter Canada.
Do you really want to sweat the connection?
AND pre clearance to US can also be a pain at times