npr/responsiveiframe — pull request #20 by sarahgoldman (2013-09-25 19:54:48+00:00)
Title: Support for multiple responsive iframes on one page.

Added support for multiple iframes on one page by passing the href as well as the height to the parent window in postMessage, and then only resizing the iframe with the matching src attribute. I have tested it with cross-domain frames in IE8+, Chrome, Safari, and Firefox.

It seems the existing fallback method was setting the hash in the frame window and then checking it in the parent window. It is now setting it in the frame and checking each iframe for its content window hash. Still doesn't work across domains, but I have added a catch so it won't error. This is still only applied to IE7 and other browsers where postMessage is not supported.

Lastly, I cleaned up the files to pass as much of jslint as possible.