ace: Use `globalThis` instead of non-strict default context
This is necessary before `'use strict';` can be added to the top of the file.list-test-fix
parent
3c2e0f0e16
commit
8668017c62
|
@ -255,13 +255,13 @@ plugins.ensure(function () {\n\
|
||||||
|
|
||||||
iframeHTML.push('</head><body id="innerdocbody" class="innerdocbody" role="application" class="syntax" spellcheck="false"> </body></html>');
|
iframeHTML.push('</head><body id="innerdocbody" class="innerdocbody" role="application" class="syntax" spellcheck="false"> </body></html>');
|
||||||
|
|
||||||
// Expose myself to global for my child frame.
|
// eslint-disable-next-line node/no-unsupported-features/es-builtins
|
||||||
const thisFunctionsName = 'ChildAccessibleAce2Editor';
|
const gt = typeof globalThis === 'object' ? globalThis : window;
|
||||||
(function () { return this; }())[thisFunctionsName] = Ace2Editor;
|
gt.ChildAccessibleAce2Editor = Ace2Editor;
|
||||||
|
|
||||||
const outerScript = `\
|
const outerScript = `\
|
||||||
editorId = ${JSON.stringify(info.id)};\n\
|
editorId = ${JSON.stringify(info.id)};\n\
|
||||||
editorInfo = parent[${JSON.stringify(thisFunctionsName)}].registry[editorId];\n\
|
editorInfo = parent.ChildAccessibleAce2Editor.registry[editorId];\n\
|
||||||
window.onload = function () {\n\
|
window.onload = function () {\n\
|
||||||
window.onload = null;\n\
|
window.onload = null;\n\
|
||||||
setTimeout(function () {\n\
|
setTimeout(function () {\n\
|
||||||
|
|
Loading…
Reference in New Issue