|
483 | 483 | document.body.appendChild(iframe); |
484 | 484 | var iDoc = (iDoc = iframe.contentDocument || iframe.contentWindow).document || iDoc; |
485 | 485 | iDoc.write( |
486 | | - '<script>\ |
487 | | - parent.iElement = document.createElement("div");\ |
488 | | - parent.iArguments = (function(){ return arguments; })(1, 2, 3);\ |
489 | | - parent.iArray = [1, 2, 3];\ |
490 | | - parent.iString = new String("hello");\ |
491 | | - parent.iNumber = new Number(100);\ |
492 | | - parent.iFunction = (function(){});\ |
493 | | - parent.iDate = new Date();\ |
494 | | - parent.iRegExp = /hi/;\ |
495 | | - parent.iNaN = NaN;\ |
496 | | - parent.iNull = null;\ |
497 | | - parent.iBoolean = new Boolean(false);\ |
498 | | - parent.iUndefined = undefined;\ |
499 | | - parent.iObject = {};\ |
500 | | - parent.iError = new Error();\ |
501 | | - </script>' |
| 486 | + [ |
| 487 | + '<script>', |
| 488 | + 'parent.iElement = document.createElement("div");', |
| 489 | + 'parent.iArguments = (function(){ return arguments; })(1, 2, 3);', |
| 490 | + 'parent.iArray = [1, 2, 3];', |
| 491 | + 'parent.iString = new String("hello");', |
| 492 | + 'parent.iNumber = new Number(100);', |
| 493 | + 'parent.iFunction = (function(){});', |
| 494 | + 'parent.iDate = new Date();', |
| 495 | + 'parent.iRegExp = /hi/;', |
| 496 | + 'parent.iNaN = NaN;', |
| 497 | + 'parent.iNull = null;', |
| 498 | + 'parent.iBoolean = new Boolean(false);', |
| 499 | + 'parent.iUndefined = undefined;', |
| 500 | + 'parent.iObject = {};', |
| 501 | + 'parent.iError = new Error();', |
| 502 | + '</script>' |
| 503 | + ].join('\n') |
502 | 504 | ); |
503 | 505 | iDoc.close(); |
504 | 506 |
|
|
0 commit comments