The foam holds up, but you should immediately wash away any foam spilled where it shouldn't be, as it otherwise leaves ugly marks or stains.
I hope the foam doesn't change the shape of the frame; sometimes supports are needed when foaming.
Foaming the threshold is a bit unnecessary, and it's easy for the threshold to rise, causing the door to hang poorly afterward.
Is it a low-expanding foam?