How about this? ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING
https://github.com/google/closure-library/issues/844#issuecomment-331235307
Looks like it's used in UIModuleUtils.as for its purpose, too.
On 7/11/2021 4:08 AM, Harbs wrote:
> We’ve been working on migrating a Royale project to Adobe’s UXP environment.
>
> Release build works, but debug build does not because of some of the inner
> workings in the goog library.
>
> AIUI, the main blocker is:
>
> goog.inHtmlDocument_ = function() {
> /** @type {!Document} */
> var doc = goog.global.document;
> return doc != null && 'write' in doc; // XULDocument misses write.
> };
>
>
> UXP does not have document.write so goog.addDependency, goog.require and
> goog.base do not work correctly.
>
> I’ve also noticed that recently browsers seem to be taking much longer to
> load scripts in debug mode. I suspect that’s because document.write is
> deprecated.
>
> Because of this, I’d really like to explore removing the reliance on
> document.write and instead write script tags to load the scripts (in the
> correct order).
>
> We’re going to need to figure out what to do with goog.provide and
> goog.require which is written into classes.
>
> How necessary is that? Can we just use ES6 instead? Should we rewrite some of
> the goog functions to do more precisely what we need?
>
> Thoughts?
>
> Harbs