defunkt/jquery-pjax — pull request #257 by sshirokov (2013-02-26 10:18:43+00:00)
Title: Allow a pjax update to eval scripts[src=..] returned in the body

First attempt #255 failed CI and was closed.

This implements the same idea in a less noisy and, at least locally, CI :+1: way.

This extracts `script[src]` tags from the response body right away and removes them as children.

After the body is `$.html`'ed into the DOM, the script tags are written out to either `document.head`, if available, or the current `context`, where the original body was written. If a tag with a matching `src=` attribute is found, it is not written again.