Add missing realm.element.

This commit is contained in:
John-David Dalton
2016-10-09 21:27:25 -07:00
parent c541598f40
commit dcf6d382c4

View File

@@ -659,7 +659,7 @@
' });', ' });',
'', '',
' return object;', ' return object;',
'}())' '}());'
].join('\n'))); ].join('\n')));
}); });
@@ -673,11 +673,12 @@
var idoc = (idoc = iframe.contentDocument || iframe.contentWindow).document || idoc; var idoc = (idoc = iframe.contentDocument || iframe.contentWindow).document || idoc;
idoc.write([ idoc.write([
'<html>',
'<body>',
'<script>', '<script>',
'var _ = parent._;', 'var _ = parent._,',
'', ' noop = function() {},',
' var noop = function() {},', ' root = this;',
' root = this;',
'', '',
'var object = {', 'var object = {',
" 'ArrayBuffer': root.ArrayBuffer,", " 'ArrayBuffer': root.ArrayBuffer,",
@@ -686,6 +687,7 @@
" 'arrayBuffer': root.ArrayBuffer ? new root.ArrayBuffer : undefined,", " 'arrayBuffer': root.ArrayBuffer ? new root.ArrayBuffer : undefined,",
" 'boolean': Object(false),", " 'boolean': Object(false),",
" 'date': new Date,", " 'date': new Date,",
" 'element': document.body,",
" 'errors': [new Error, new EvalError, new RangeError, new ReferenceError, new SyntaxError, new TypeError, new URIError],", " 'errors': [new Error, new EvalError, new RangeError, new ReferenceError, new SyntaxError, new TypeError, new URIError],",
" 'function': noop,", " 'function': noop,",
" 'map': root.Map ? new root.Map : undefined,", " 'map': root.Map ? new root.Map : undefined,",
@@ -710,7 +712,9 @@
'});', '});',
'', '',
'_.assign(_._realm, object);', '_.assign(_._realm, object);',
'<\/script>' '</script>',
'</body>',
'</html>'
].join('\n')); ].join('\n'));
idoc.close(); idoc.close();