summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/old-tests/submission/Microsoft/sandbox/sandbox_helper.js
blob: 1472cbf223bc6103d5a1f3124a6ca88f728b9fd5 (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";
    }
}