Does dialog-polyfill load correctly?  Does it muck with the window object?

On 5/10/20, 9:13 AM, "Yishay Weiss" <[email protected]> wrote:

    Test1.js isn’t different, but Test1_deps.js is.
    
    diff --git "a/.\\dir_with_import\\/js-debug/Test1__deps.js" 
"b/.\\dir_without_import\\/js-debug/Test1__deps.js"
    index 73eccbe..3e1a8a7 100644
    --- "a/.\\dir_with_import\\/js-debug/Test1__deps.js"
    +++ "b/.\\dir_without_import\\/js-debug/Test1__deps.js"
    @@ -211,4 +211,4 @@ 
goog.addDependency('../../../org/apache/royale/graphics/GradientEntry.js', ['org
    goog.addDependency('../../../XML.js', ['XML'], []);
    
    goog.require('Test1');
    -document.head.innerHTML += '<script 
src="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fdialog-polyfill%2F0.4.9%2Fdialog-polyfill.min.js&amp;data=02%7C01%7Caharui%40adobe.com%7C573afcb12b92475b779408d7f4fd196a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637247240200485983&amp;sdata=I%2FM82zvauRqwSBfdRH%2F0Jaim32tLAdFHuwSY6p4JHsg%3D&amp;reserved=0";></script>';document.head.innerHTM
    L += '<link rel="stylesheet" type="text/css" 
href="https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fdialog-polyfill%2F0.4.9%2Fdialog-polyfill.min.css&amp;data=02%7C01%7Caharui%40adobe.com%7C573afcb12b92475b779408d7f4fd196a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637247240200485983&amp;sdata=YLSJzDtpgffu0JMpejIWgthMsKkatnxNh29UltYZCw8%3D&amp;reserved=0";>';
    +
    
    From: Alex Harui<mailto:[email protected]>
    Sent: Sunday, May 10, 2020 6:39 PM
    To: [email protected]<mailto:[email protected]>
    Subject: Re: Modules in IE
    
    Interesting.  Just adding import shouldn't affect the output.  What is the 
difference between Test1.js with and without that import statement?
    
    -Alex
    
    On 5/10/20, 8:31 AM, "Yishay Weiss" <[email protected]> wrote:
    
        I’ve narrowed it down to usage of mx.controls.Alert. Test case is 
included in this issue [1].
    
        [1] 
https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fissues%2F826&amp;data=02%7C01%7Caharui%40adobe.com%7C573afcb12b92475b779408d7f4fd196a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637247240200485983&amp;sdata=ApIOBVZfPwSt2mLOqpqOb3QL5O%2BRSeED5fdkEqD741Y%3D&amp;reserved=0
    
        From: Alex Harui<mailto:[email protected]>
        Sent: Thursday, May 7, 2020 10:35 PM
        To: [email protected]<mailto:[email protected]>
        Subject: Re: Modules in IE
    
        I think you can verify by debugging in some other browser and see if 
breakpoints get set.
    
        A common “bug” in Flex modules was to reference and link the module 
class into the loading app.  I have no idea what will happen if you have such a 
situation in Royale.  You can look at the loading app’s  link-report to see if 
the module (Test1) is linked in the app and probably see if Test1.js is in the 
output of the app if you start clean and do not compile the module.
    
        HTH,
        -Alex
    
        From: Yishay Weiss <[email protected]>
        Reply-To: "[email protected]" <[email protected]>
        Date: Thursday, May 7, 2020 at 12:26 PM
        To: "[email protected]" <[email protected]>
        Subject: RE: Modules in IE
    
        url is
        
file:///C:/dev/RoyaleComponentTest/NewComponentTest/bin/js-debug/library/closure/goog/../../../Test1.js<file:///C:/dev/RoyaleComponentTest/NewComponentTest/bin/js-debug/Test1.js<file:///C:/dev/RoyaleComponentTest/NewComponentTest/bin/js-debug/Test1.js%3cfile:/C:/dev/RoyaleComponentTest/NewComponentTest/bin/js-debug/Test1.js>>
    
        I don’t see errors other than
    
        SEC7113: CSS was ignored due to mime type mismatch
    
        But I don’t think that’s it.
    
        I put a debugger; statement on the first line of the src which never 
kicks.
    
    
        From: Alex Harui <[email protected]>
        Sent: Wednesday, May 6, 2020 7:58:15 PM
        To: [email protected] <[email protected]>
        Subject: Re: Modules in IE
    
        What is the src (url) for that script?  Were there any errors loading 
and running it?  Are the other Royale packages/classes in the "window" object?
    
        One scenario I thought of is that some bug or something else creates a 
"window" property at the global window causing our package lookup to be off.
    
        HTH,
        -Alex
    
        On 5/6/20, 8:47 AM, "Yishay Weiss" <[email protected]> wrote:
    
            In my example <script> element is there but it’s never loaded on 
IE. I can confirm ModuleExamle works.
    
            From: Alex Harui<mailto:[email protected]>
            Sent: Sunday, May 3, 2020 9:31 AM
            To: [email protected]<mailto:[email protected]>
            Subject: Re: Modules in IE
    
            I just ran examples/royale/ModuleExample in IE and it worked.  Does 
it work for you?
            In the debugger, window.Module and window.MainApp resolve to 
functions.  window.org is an object with an apache property.
            In the DOM Explorer, there should be tons of <script> tags in the 
head.  Near the end of the list should be the script for the .js file for the 
module.
            Do you see any exceptions?  ModuleExample works without errors.
    
            -Alex
    
            On 5/2/20, 11:01 AM, "Yishay Weiss" <[email protected]> wrote:
    
                I suppose that’s what
    
                if (window[moduleName] == null) is checking
    
                The problem is that window[moduleName] never shows up. On 
Chrome it does.
    
                From: Alex Harui<mailto:[email protected]>
                Sent: Thursday, April 30, 2020 6:29 AM
                To: [email protected]<mailto:[email protected]>
                Subject: Re: Modules in IE
    
                Is this js-debug or js-release? Did the deps file load?  Did 
other definitions get created?  If js-debug, there should be new definitions 
showing up in the global/window object.  IOW, if the main app didn't have a 
DataGrid and the module did, the mx.controls.DataGrid should make an appearance 
as the deps are loaded and evaluated.
    
                -Alex
    
                On 4/29/20, 8:19 PM, "Yishay Weiss" <[email protected]> 
wrote:
    
                    Yes, it works on Chrome and FF. window[this.modulename] is 
undefined. Didn’t check what happens in other browsers.
    
                    From: Alex Harui<mailto:[email protected]>
                    Sent: Thursday, April 30, 2020 12:00 AM
                    To: [email protected]<mailto:[email protected]>
                    Subject: Re: Modules in IE
    
                    This is IE specific?  It works in other browers?  What does 
window[modulename] return?
    
                    On 4/29/20, 1:41 PM, "Yishay Weiss" 
<[email protected]> wrote:
    
                        Has anyone seen this work?
    
                        To me it’s stuck in UIModuleUtils in
    
                                COMPILE::JS
                                protected function loadDepsHandler():void
                                {
                                    // wait for other scripts to load
                                    if (window[moduleName] == null)
                                    {
                                        setTimeout(loadDepsHandler, 250);
                                    }
                                    else
                                        loadHandler();
    
                                }
                        Window[moduleName] is never not null.
    
    
    
    
    
    
    
    
    
    
        From: Alex Harui<mailto:[email protected]>
        Sent: Wednesday, May 6, 2020 7:58 PM
        Subject: Re: Modules in IE
    
        What is the src (url) for that script?  Were there any errors loading 
and running it?  Are the other Royale packages/classes in the "window" object?
    
        One scenario I thought of is that some bug or something else creates a 
"window" property at the global window causing our package lookup to be off.
    
        HTH,
        -Alex
    
        On 5/6/20, 8:47 AM, "Yishay Weiss" <[email protected]> wrote:
    
            In my example <script> element is there but it’s never loaded on 
IE. I can confirm ModuleExamle works.
    
            From: Alex Harui<mailto:[email protected]>
            Sent: Sunday, May 3, 2020 9:31 AM
            To: [email protected]<mailto:[email protected]>
            Subject: Re: Modules in IE
    
            I just ran examples/royale/ModuleExample in IE and it worked.  Does 
it work for you?
            In the debugger, window.Module and window.MainApp resolve to 
functions.  window.org is an object with an apache property.
            In the DOM Explorer, there should be tons of <script> tags in the 
head.  Near the end of the list should be the script for the .js file for the 
module.
            Do you see any exceptions?  ModuleExample works without errors.
    
            -Alex
    
            On 5/2/20, 11:01 AM, "Yishay Weiss" <[email protected]> wrote:
    
                I suppose that’s what
    
                if (window[moduleName] == null) is checking
    
                The problem is that window[moduleName] never shows up. On 
Chrome it does.
    
                From: Alex Harui<mailto:[email protected]>
                Sent: Thursday, April 30, 2020 6:29 AM
                To: [email protected]<mailto:[email protected]>
                Subject: Re: Modules in IE
    
                Is this js-debug or js-release? Did the deps file load?  Did 
other definitions get created?  If js-debug, there should be new definitions 
showing up in the global/window object.  IOW, if the main app didn't have a 
DataGrid and the module did, the mx.controls.DataGrid should make an appearance 
as the deps are loaded and evaluated.
    
                -Alex
    
                On 4/29/20, 8:19 PM, "Yishay Weiss" <[email protected]> 
wrote:
    
                    Yes, it works on Chrome and FF. window[this.modulename] is 
undefined. Didn’t check what happens in other browsers.
    
                    From: Alex Harui<mailto:[email protected]>
                    Sent: Thursday, April 30, 2020 12:00 AM
                    To: [email protected]<mailto:[email protected]>
                    Subject: Re: Modules in IE
    
                    This is IE specific?  It works in other browers?  What does 
window[modulename] return?
    
                    On 4/29/20, 1:41 PM, "Yishay Weiss" 
<[email protected]> wrote:
    
                        Has anyone seen this work?
    
                        To me it’s stuck in UIModuleUtils in
    
                                COMPILE::JS
                                protected function loadDepsHandler():void
                                {
                                    // wait for other scripts to load
                                    if (window[moduleName] == null)
                                    {
                                        setTimeout(loadDepsHandler, 250);
                                    }
                                    else
                                        loadHandler();
    
                                }
                        Window[moduleName] is never not null.
    
    
    
    
    
    
    
    
    
    
    
    
    
    

Reply via email to