continuing the differences I see on compilation: dialogPolyfill
that is at top level (no package at all) and is in Jewel lib is compiled in Compiling file: dialogPolyfill Writing file: externs/dialogPolyfill.js Writing file: externs/dialogPolyfill.js.map while hljs that is located in TDJ and only throws this on logs: using extern file: /Users/carlosrovira/Dev/Royale/Source/royale-asjs/examples/royale/TourDeJewel/target/javascript/bin/js-debug/hljs.js El mié., 8 may. 2019 a las 21:16, Carlos Rovira (<[email protected]>) escribió: > Hi, > > if I use this line > > window["dialogPolyfill"]["registerDialog"](dialog); > > > in Alert.as in Jewel > Then compile TDJ app, we get App.js in release with normal content > > But I use instead this line: > > dialogPolyfill.registerDialog(dialog); > > js-release file has no code just, only this > > //# sourceMappingURL=./App.js.map > > Seems there's some bug in some place > > > > > El mié., 8 may. 2019 a las 20:32, Carlos Rovira (<[email protected]>) > escribió: > >> Other difference is: >> >> hljs is defined in TDJ project >> >> dialogPolyfill is defined in Jewel library >> >> both seems identical, but there should be some difference that's make TDJ >> breaks completely with a blank page >> >> >> El mié., 8 may. 2019 a las 20:29, Carlos Rovira (<[email protected]>) >> escribió: >> >>> Hi Alex, >>> >>> hljs: >>> >>> /** >>> * block is the element (WrappedHTMLElement) inside the component (the >>> <code> tag) >>> * @export >>> * @param {org.apache.royale.core.WrappedHTMLElement} block >>> */ >>> utils.HighlightCode.prototype.highlightBlock = function(block) { >>> hljs.highlightBlock(block); >>> }; >>> >>> >>> >>> dialogPolyfill: >>> >>> /** >>> * This function make the dialog be added only once to document.body if >>> parent is not >>> * provided (null) or to parent if indicated. >>> * >>> * @langversion 3.0 >>> * @playerversion Flash 10.2 >>> * @playerversion AIR 2.6 >>> * @productversion Royale 0.9.4 >>> * @private >>> * @param {Object=} parent >>> */ >>> org.apache.royale.jewel.Alert.prototype. >>> org_apache_royale_jewel_Alert_prepareAlert = function(parent) { >>> parent = typeof parent !== 'undefined' ? parent : null; >>> if (!this.org_apache_royale_jewel_Alert_lockDialogCreation) { >>> this.org_apache_royale_jewel_Alert_lockDialogCreation = true; >>> if (parent != null) { >>> parent["addElement"](this); >>> } else { >>> var /** @type {HTMLElement} */ body = document.getElementsByTagName( >>> 'body')[0]; >>> body.appendChild(this.element); >>> } >>> this.addedToParent(); >>> if (!("showModal" in this.org_apache_royale_jewel_Alert_dialog)) { >>> dialogPolyfill.registerDialog(this.org_apache_royale_jewel_Alert_dialog >>> ); >>> } >>> document.body.classList.add("viewport"); >>> } >>> }; >>> >>> >>> >>> El mié., 8 may. 2019 a las 5:11, Alex Harui (<[email protected]>) >>> escribió: >>> >>>> What did the compiler generate for dialogPolyFill and for hljs? >>>> >>>> -Alex >>>> >>>> On 5/7/19, 2:58 AM, "Carlos Rovira" <[email protected]> wrote: >>>> >>>> Hope someone could take a look at this >>>> >>>> the change is this: >>>> >>>> window["dialogPolyfill"]["registerDialog"](dialog); >>>> // dialogPolyfill.registerDialog(dialog); >>>> >>>> that is mostly the same for hljs, that is working >>>> >>>> hljs.highlightBlock(block); >>>> >>>> //var hljs:Object = window["hljs"]; >>>> //prevent renaming by compiler >>>> //hljs["highlightBlock"](block); >>>> >>>> very strange isn't it? >>>> >>>> thanks >>>> >>>> Carlos >>>> >>>> >>>> >>>> >>>> El lun., 6 may. 2019 a las 20:43, Carlos Rovira (< >>>> [email protected]>) >>>> escribió: >>>> >>>> > Hi, >>>> > >>>> > trying release mode of TDJ I saw it was failing with a blank >>>> page, this is >>>> > due to lastest change I did calling dialogPolyFill >>>> > you can see the line I change in my latest commit. >>>> > This works ok in debug mode, but not in release mode >>>> > >>>> > I did mostly the same for hljs as Josh pointed me, but this time >>>> this not >>>> > worked and breaks the app >>>> > >>>> > someone know what could be wrong? >>>> > >>>> > thanks >>>> > >>>> > -- >>>> > Carlos Rovira >>>> > >>>> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C48cb2b761e94463acab008d6d2d2849d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636928198941367709&sdata=xRn6OwSMj44dXFYpViEi4XvGE%2Bgf6WSXRpMXAtx9ed8%3D&reserved=0 >>>> > >>>> > >>>> >>>> -- >>>> Carlos Rovira >>>> >>>> https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C48cb2b761e94463acab008d6d2d2849d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636928198941367709&sdata=xRn6OwSMj44dXFYpViEi4XvGE%2Bgf6WSXRpMXAtx9ed8%3D&reserved=0 >>>> >>>> >>>> >>> >>> -- >>> Carlos Rovira >>> http://about.me/carlosrovira >>> >>> >> >> -- >> Carlos Rovira >> http://about.me/carlosrovira >> >> > > -- > Carlos Rovira > http://about.me/carlosrovira > > -- Carlos Rovira http://about.me/carlosrovira
