Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onmessage = function(global) {
- return function(e) {
- if(e.data.indexOf('start') > -1) {
- var str = '<table width="100%" border="1" cellspacing="0" cellpadding="2">\n';
- for (var i in global) {
- if(i!=='onmessage') {
- str += '<tr><td style="background: #AABBCC">' + i + '</td><td style="background: #DDEEFF">' + global[i] + '</td></tr>\n';
- } else {
- str += '<tr><td style="background: #AABBCC">' + i + '</td><td style="background: #DDEEFF">onmessage eventHandler</td></tr>\n';
- }
- }
- str += '</table>\n';
- global.postMessage(str);
- }
- };
- }(this);
Add Comment
Please, Sign In to add comment