locked
Implement Dojo Toolkit with Metro Style App at this time?

    Question

  • Hi there,

    I found out that some framework like 'jQuery' might be able to use for developing metro app. So I try to use other javascript framework like 'Dojo Toolkit'. I try to duplicate what I usually done by referecing to dojo library like '    <script src="*****" type="text/javascript"></script>' then use 'dojo.require()' to import the widget.

    However when I debug it, error said 'An application cannot load remote web content in the local compartment.' and 'dojo' is undefined '


    So is it also possible that I can use other frameworks like 'Dojo Toolkit' to develop metro app at this time or is there any error with my code?

    Thanks



    Wednesday, February 22, 2012 9:09 AM

Answers

  • i dont know dojo but i know you cant load remote scripts they have to be local so you would probably need to download the dojo files and import them into the js folder of your project and anywhere in your code where you would normally source a remote script for example <script src="http://location.com/dojo.js.... "  just change it to a local file <script src="/js/dojo.js" ...  i think everything needs to be local and in your project to prevent malicious scripts being used
    Friday, February 24, 2012 7:07 PM

All replies

  • Hi Woramin,

    I do not know of anyone who has used the 'Dojo Toolkit' with Metro style apps.  You would need to debug the framework or contact the community at dojotoolkit.org for support with that 3rd party toolkit.

    -Jeff


    Jeff Sanders (MSFT)

    Wednesday, February 22, 2012 1:31 PM
    Moderator
  • Hi Jeff,

    Actually, I already asked Dojo themselves before I posted in this forum. But they haven't make any feedback yet on my question so I just try asking on this Microsoft site too.

    By the way, what does an error "An application cannot load remote web content in the local compartment." mean? I can't load script from the external source and need to use only script that I have in my local computer?

    Thursday, February 23, 2012 8:48 AM
  • i dont know dojo but i know you cant load remote scripts they have to be local so you would probably need to download the dojo files and import them into the js folder of your project and anywhere in your code where you would normally source a remote script for example <script src="http://location.com/dojo.js.... "  just change it to a local file <script src="/js/dojo.js" ...  i think everything needs to be local and in your project to prevent malicious scripts being used
    Friday, February 24, 2012 7:07 PM
  • Hi Amy

    Thanks for your answer. So that's might be why I can't use dojo script when I try to load it from remote content.
    I think that might solve my question now
    Monday, February 27, 2012 2:54 AM