OLD | NEW |
1 onmessage = function(msg) { | 1 onmessage = function(msg) { |
2 var proxy = msg.data[0]; | 2 var proxy = msg.data[0]; |
3 var attrib = msg.data[1]; | 3 var attrib = msg.data[1]; |
4 try { | 4 try { |
5 if (proxy.supports(attrib)) { | 5 if (proxy.supports(attrib)) { |
6 proxy[attrib] = 0; | 6 proxy[attrib] = 0; |
7 postMessage('success'); | 7 postMessage('success'); |
8 } else { | 8 } else { |
9 postMessage('error: Received non-supported attribute "' + attrib + '
"'); | 9 postMessage('error: Received non-supported attribute "' + attrib + '
"'); |
10 } | 10 } |
11 } catch (e) { | 11 } catch (e) { |
12 postMessage('error: ' + e); | 12 postMessage('error: ' + e); |
13 } | 13 } |
14 } | 14 } |
OLD | NEW |