New issue
Advanced search Search tips

Issue 923 attachment: map.html (731 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<html><body><script>
var b = new Array(1,2,3);
var d = new Array(1,2,3);
class dummy{

constructor(){
alert("in constructor");
return d;
}

}

var handler = {
get: function(target, name){

if(name == "length"){
return 0x100;
}
return {[Symbol.species] : dummy};
},

has: function(target, name){
alert("has " + name);
return true;
}
};

var p = new Proxy([], handler);

var a = new Array(1,2,3);

function test(){
return 0x777777777777;

}


var o = a.map.call(p, test);

var h = [];

for(item in o){

var n = new Number(o[item]);
if (n < 0){
n = n + 0x100000000;
}
h.push(n.toString(16));

}

alert(h);

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