You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Wei CSDL Shi <sh...@cn.ibm.com> on 2011/08/29 05:47:59 UTC

Ways to check a feature is loaded or not


Hi, can anybody point me how could I check whether a feature has been
loaded by shindig?

Previously, I was using the window['___jsl']['l'] object in the client to
check whether a feature name is in this list. Then I can tell my
application code to not load that feature again.

But in recent shindig build, this way seems not working anymore. window
['___jsl']['l'] object only return a list of features that I explicitly
added in the <script> tag. For example, if I load the script in
this: /gadgets/js/container:rpc:pubsub-2.js, window['___jsl']['l'] only
contains container, rpc, pubsub-2. All the other features that loaded up
because of the dependency are not shown up in window['___jsl']['l'].

Because of this change, my application code now can't tell whether a
feature is loaded.

Anybody happen to know this change in Shindig? Can anyone point to me a
better way to check whether a feature is loaded in the client side?

BTW, I tried gadgets.util.hasFeature() as well, it is not working.

Thanks
Best Regards

Marshall Shi(Shi Wei)
shiwcsdl@cn.ibm.com  (86-21)60922779

Re: Ways to check a feature is loaded or not

Posted by Wei CSDL Shi <sh...@cn.ibm.com>.
Hi, shindiggers, anybody have any recommendation about how to check the a
feature loaded or not?

Thanks
Best Regards

Marshall Shi(Shi Wei)
shiwcsdl@cn.ibm.com  (86-21)60922779


                                                                           
             Wei CSDL                                                      
             Shi/China/IBM@IBM                                             
             CN                                                         To 
                                       dev@shindig.apache.org              
             2011-08-29 11:47                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         Ways to check a feature is loaded   
             dev@shindig.apach         or not                              
                   e.org                                                   
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           






Hi, can anybody point me how could I check whether a feature has been
loaded by shindig?

Previously, I was using the window['___jsl']['l'] object in the client to
check whether a feature name is in this list. Then I can tell my
application code to not load that feature again.

But in recent shindig build, this way seems not working anymore. window
['___jsl']['l'] object only return a list of features that I explicitly
added in the <script> tag. For example, if I load the script in
this: /gadgets/js/container:rpc:pubsub-2.js, window['___jsl']['l'] only
contains container, rpc, pubsub-2. All the other features that loaded up
because of the dependency are not shown up in window['___jsl']['l'].

Because of this change, my application code now can't tell whether a
feature is loaded.

Anybody happen to know this change in Shindig? Can anyone point to me a
better way to check whether a feature is loaded in the client side?

BTW, I tried gadgets.util.hasFeature() as well, it is not working.

Thanks
Best Regards

Marshall Shi(Shi Wei)
shiwcsdl@cn.ibm.com  (86-21)60922779