Uncaught TypeError: Cannot read properties of undefined (reading 'ua’)

in gf(Ci, We.H.ua);

“We.H" is undefined.

Here’s the surrounding code:

function Ci(a, b) {
    We.H.ua.call(this, a, b)
}
gf(Ci, We.H.ua);
C(je, Ci);
Ci.unwrap = function(a) {
    return We.H.ua.unwrap(a)
}
;
C('org.apache.royale.utils.string.InternalSafeUrl.unwrap', Ci.unwrap);
Ci.sanitize = function(a) {
    return We.H.ua.sanitize(a)
}
;
C('org.apache.royale.utils.string.InternalSafeUrl.sanitize', Ci.sanitize);
Ci.prototype.g = {
    names: [{
        name: 'InternalSafeUrl',
        h: je,
        kind: p
    }]
};
Ci.prototype.i = function() {
    return {
        methods: function() {
            return {
                InternalSafeUrl: {
                    type: '',
                    declaredBy: je,
                    parameters: function() {
                        return [l, !1, k, !1]
                    }
                },
                '|unwrap': {
                    type: l,
                    declaredBy: je,
                    parameters: function() {
                        return [kc, !1]
                    }
                },
                '|sanitize': {
                    type: kc,
                    declaredBy: je,
                    parameters: function() {
                        return [l, !1]
                    }
                }
            }
        }
    }
}
;

> On Dec 26, 2021, at 7:27 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
> 
> What error do you get in release mode?  The goog classes "should" be renamed 
> in release mode if it is all static methods.
> 
> -Alex
> 
> On 12/26/21, 2:11 AM, "Harbs" <harbs.li...@gmail.com> wrote:
> 
>    I subclassed the goog classes. That seems to help in debug mode, but for 
> some reason I’m not clear on, the goog classes disappear in release mode.
> 
>    You can see what I did on the sanitize branch...
> 
>> On Dec 26, 2021, at 9:35 AM, Harbs <harbs.li...@gmail.com> wrote:
>> 
>> I’ll try to create placeholder classes to subclass them.
>> 
>>> Might be simpler to just special case these two.
>> 
>> How would we go about that?
>> 
>>> On Dec 25, 2021, at 6:08 PM, Alex Harui <aha...@adobe.com.INVALID> wrote:
>>> 
>>> Hmm.  That may not work since you can't extend a static function.  Might be 
>>> simpler to just special case these two.
>>> 
>>> -Alex
>>> 
>>> On 12/25/21, 12:08 AM, "Alex Harui" <aha...@adobe.com.INVALID> wrote:
>>> 
>>>  I took a look.  It does require an "extends" relationship to force the 
>>> goog.require for something in GCL.swc.  I don't think we want to change 
>>> that, so try a workaround.
>>> 
>>>  On 12/20/21, 9:02 AM, "Alex Harui" <aha...@adobe.com.INVALID> wrote:
>>> 
>>>      I will try to look at it this coming weekend.  One thing to try for 
>>> now is to create a class that extends goog.html.SafeHtml and redirect 
>>> sanitization through the subclass.  Maybe the only way to get the 
>>> dependency is to have an 'extends' relationship on the dependency, since 
>>> that's what EventDispatcher does.
>>> 
>>>      -Alex
>>> 
>>>      On 12/20/21, 7:16 AM, "Harbs" <harbs.li...@gmail.com> wrote:
>>> 
>>> 
>>> 
>>>> On Dec 20, 2021, at 10:20 AM, Alex Harui <aha...@adobe.com.INVALID> wrote:
>>>> 
>>>> I might have time this weekend to spend more time getting it to work, but 
>>>> the idea is that you add to GCL.swc the .as version of whatever JS file 
>>>> you need from Google Closure Library
>>> 
>>>          Check.
>>> 
>>>> , make sure the subset code in downloads.xml doesn't delete it,
>>> 
>>>          Check.
>>> 
>>>> and then if the transpiled output of, say, Label references 
>>>> goog.html.SafeHtml, it should show up in the addDependency line for Label.
>>> 
>>> 
>>>          Here’s where I’m stuck.
>>> 
>>>          That’s what I was expecting, but it doesn’t. I don’t know if it’s 
>>> because it’s a utility function rather than a class or some other reason, 
>>> but goog.html.SafeHtml and friends do not appear as dependencies.
>>> 
>>> 
>>> 
>> 
> 
> 

Reply via email to