Load legacy javascript library (MX5).

1
Hi everyone, I have javascript library and it is loaded fine in Mx4. After using dojo.require(...), in the global scope, I see many new objects and functions. In mendix 5, it is loaded but no new objects/functions are populated in global scope. Suppose that the library is big and i cannot change it too much. Is there any ways to load my library in Mx5? If I want my library is available only in the scope of my widget, how I can do that? Best regards,
asked
1 answers
7

You are right. Dojo made some changes in version 1.8, which makes variables not explicitly declared in global scope not available in global scope. Also see this question on stackoverflow. You could either define the variables explicitly in global scope, or use dojo.xhrGet (handleAs javascript) instead of dojo.require to load your script.

answered