blob: 26aa67faf467264ba93bb9921d40b80dc3516b9c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function IsSandboxSupported() {
if ('sandbox' in document.createElement('iframe')) {
return true;
}
return false;
}
function DisableTestForNonSupportingBrowsers() {
//check if sandbox is supported by the browser
if (!IsSandboxSupported()) {
document.getElementById('testframe').innerHTML = "FAIL: Your browser does not support the sandbox attribute on the iframe element.";
document.getElementById('testframe').style.color = "Red";
}
}
|