royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <carlosrov...@apache.org>
Subject Re: [royale-asjs] branch develop updated: Add type declaration, plus make sure callback is defined
Date Thu, 20 Sep 2018 10:27:25 GMT
Thanks Harbs,
If nobody comes first I'll add that class as I try to add the theme
selector to Jewel Example, hopefully some time in the next days

El jue., 20 sept. 2018 a las 12:22, Harbs (<harbs.lists@gmail.com>)
escribió:

> The only thing we have for css is addDynamicSelector which I don’t think
> does what you want.
>
> Loading a css file should be almost the same as JS.
>
> > On Sep 20, 2018, at 1:12 PM, Carlos Rovira <carlosrovira@apache.org>
> wrote:
> >
> > Hi,
> >
> > do we have something like this for CSS files?
> > I was thinking in add to JewelExample a "theme selector", and I think it
> > could be great to add the css on the fly
> >
> > thanks
> >
> > Carlos
> >
> >
> > El jue., 20 sept. 2018 a las 12:03, <yishayw@apache.org> escribió:
> >
> >> This is an automated email from the ASF dual-hosted git repository.
> >>
> >> yishayw pushed a commit to branch develop
> >> in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
> >>
> >>
> >> The following commit(s) were added to refs/heads/develop by this push:
> >>     new 7441707  Add type declaration, plus make sure callback is
> defined
> >> 7441707 is described below
> >>
> >> commit 7441707fb929c0c43b11c8a9088c78b24eccac7d
> >> Author: DESKTOP-RH4S838\Yishay <yishayjobs@hotmail.com>
> >> AuthorDate: Thu Sep 20 13:03:27 2018 +0300
> >>
> >>    Add type declaration, plus make sure callback is defined
> >> ---
> >> .../src/main/royale/org/apache/royale/utils/js/loadJavascript.as   | 7
> >> +++++--
> >> 1 file changed, 5 insertions(+), 2 deletions(-)
> >>
> >> diff --git
> >>
> a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/js/loadJavascript.as
> >>
> b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/js/loadJavascript.as
> >> index 26b2d70..b6ade28 100644
> >> ---
> >>
> a/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/js/loadJavascript.as
> >> +++
> >>
> b/frameworks/projects/Core/src/main/royale/org/apache/royale/utils/js/loadJavascript.as
> >> @@ -28,10 +28,13 @@ package org.apache.royale.utils.js
> >>    * @royaleignorecoercion HTMLScriptElement
> >>    */
> >>   COMPILE::JS
> >> -  public function loadJavascript(url:String,callback:Function=null)
> >> +  public function
> loadJavascript(url:String,callback:Function=null):void
> >>   {
> >>     var script:HTMLScriptElement = document.createElement('script') as
> >> HTMLScriptElement;
> >> -    script.onload = callback;
> >> +       if (callback)
> >> +       {
> >> +                   script.onload = callback;
> >> +       }
> >>     script.src = url;
> >>     document.head.appendChild(script);
> >>   }
> >>
> >>
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message