modernizr
Version:
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
20 lines (17 loc) • 467 B
JavaScript
/*!
{
"name": "iframe[sandbox] Attribute",
"property": "sandbox",
"tags": ["iframe"],
"notes": [{
"name": "WhatWG Spec",
"href": "http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-sandbox"
}]
}
!*/
/* DOC
Test for `sandbox` attribute in iframes.
*/
define(['Modernizr', 'createElement'], function( Modernizr, createElement ) {
Modernizr.addTest('sandbox', 'sandbox' in createElement('iframe'));
});