With the final attempt of the shootout, Elias skated in on net and deked to the backhand before slipping it under the outstretched left pad of Sergei Bobrovsky for the win.
Adam Henrique scored the first goal of his career while Zach Parise and David Clarkson each lit the lamp for the Devils, who snapped a three-game slide. Johan Hedberg made 20 saves and stopped two of the three shootout attempts.
Zac Rinaldo tallied his first NHL goal while Claude Giroux and Maxime Talbot also scored for the Flyers, who had a two-game winning streak stopped. Bobrovsky made 36 saves, but stopped just one of three shootout chances.