Despite another impressive Jambos display which opens up a six-point lead at the top of the table plus a late red card for skipper Steven Pressley all the talk before, during and after the game was of former manager George Burley who walked out on Saturday.
But Hearts showed it was business as usual in the first three minutes as Hartley had a shot blocked before Rudolf Skacel hit the bar and Michal Pospisil sent a glancing header wide.
Skacel then set up Hartley with only the keeper to beat but poor control let him down. Moments later a back heel from Edgaras Jankauskas freed Samuel Camazzola and the Brazilian fired narrowly over.
Dunfermiline thought they had weathered the storm but conceded two goals in two minutes midway through the first half. Skacel's low left-footer from 20 yards was special and Pospisil topped it with a neat turn and subtle finish.
The Young brothers, Derek and Darren, briefly threatened a Dunfermiline fightback and Mark Burchill also headed wide but Hearts were in control again after the break with Andy Webster missing a free header.
Lee Makel blasted Dunfermline's best chance over the top with 20 minutes left, and although Skacel and substitute Deividas Cesnauskis might have made it 3-0 by the end, a hamstring problem for Hartley and the last minute sending off of Pressley for a foul on Darren Young took some of the gloss off the victory.