In the Feynman Lectures on Physics part ||, chapter 22-3 he defines potential differnce like this:
The picture is an element in a curicuit, the black lines on top and the bottom are the conductors, and the red lines are hypothetical lines.
He assumes that the induced magnetic field stays inside the elements (lumped element model). Outside the elements then Faradays law gives us that $\nabla \times E = 0$. So Stokes theorem tells us that $\int E dl$ is independent of the path from A to B if we integrate outside the element (the red lines are hypothetical lines outside the element), so we can define the potential this way ($\int E dl$ on any line outside the element).
But it seems very natural that the work that is done to the charge when moving through the element should be the potential difference. But how can we argue this? Strictly speaking we only have that this would be the work if we move the charge outside the element. What is the argument that this is also the work when the charge is moved inside the element from A to B?