framed.js 320 B

12345678910111213141516
  1. /*!
  2. {
  3. "name": "Framed window",
  4. "property": "framed",
  5. "tags": ["window"],
  6. "builderAliases": ["window_framed"]
  7. }
  8. !*/
  9. /* DOC
  10. Tests if page is iframed.
  11. */
  12. define(['Modernizr'], function(Modernizr) {
  13. // github.com/Modernizr/Modernizr/issues/242
  14. Modernizr.addTest('framed', window.location !== top.location);
  15. });