blob: e040d379c98880054736c1b9f6c2b9e3dac6ade5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<p>This page verifies that function parameters cannot be deleted.</p>
<pre id="console"></pre>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function log(s)
{
document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
}
function f(x)
{
delete x;
try {
x; // This line will throw an exception if x has been deleted.
log("PASS: Function parameter not deleted.");
} catch(e) {
log("FAIL: Function parameter deleted (" + e + ").");
}
}
f();
eval("f()");
</script>
|