config on client side for dynamically defined mojit for v0.7


I am in the middle of upgrading my mojito from 0.4.9 to latest version 0.7, and I came across this problem:

I have a mojit A, which contains dynamically defined children mojits B & C, when defining B & C in A I have also given them configs. However, I found out that I cannot access config from the binders of B & C (ie mp.config.x does not work).

I came across this release note for 0.6 https://github.com/yahoo/mojito/wiki/ReleaseNotes0_6_0 , it suggests using 'base' instead of 'type', but this seems to only apply to mojts defined INSIDE application.json.

How do I get my binder to access config when the mojit was dynamically defined?

Thanks in advance.

  • ft
  • Jul 24, 2013
6 Replies
  • Hey FT, check the history:


    config is not longer leaking to the client side. If you want to pass data to use it from the mojitProxy, you can use the new mojito-data-addon. There is a whole new section about data channels.

    this is not related to the suggestion about base instead of type though.

  • Hi Caridy,

    could you please check your HTML sources, as far as I can see, the information is still leaked to the client, in the HTML, even if it is no longer accessible in the actual code.

    In our custom HTMLFrameMojit we have the following config param: "children":{"type":"RegistrationMojit","config":{"secret":{"user":"...

    The problem is the deploy-server addon just dumps everything in there. At that point this information should be throttled and not released out to client.

  • 0
  • thanks.

  • Hi Caridy, Thanks for your reply, so just to confirm things - is this config info now not available in binder.js at all, ie no matter what the controller affinity is (client, common, server)?

    Thanks again.

  • This configuration IS NOT available in the binder anymore, no matter what affinity the controller has. If you want data to be passed from controller to binder thru the mojitProxy, you have to use the data channels.


Recent Posts

in Yahoo! Mojito