New issue
Advanced search Search tips

Issue 1033 attachment: bind.html (405 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html><body><script>


var ba;

function s(){
alert("in s");
ba = this;
}


function g(){
alert("in g");
return 7;
}


function dummy(){
alert("just a function");
}

alert("start");

try{
Object.defineProperty(Array.prototype, "0", {set : s, get : g});
var f = dummy.bind({}, 1, 2, 3, 4);
alert("ba" + ba);
ba.length = 100000;
f(1, 2, 3);
}catch(e){

alert(e.message);

}


</script></body></html>