Hello, I recently switched from donejs to javascriptmvc github master in seek of 3.3 upcoming stability,
but I encounter a strange behaviour of the $ usage with steal.
If I use steal('can/control').then(function($) syntax it seems that $ reference something in can.Construct in the function scope
If I use steal('can/control').then(function() syntax $ references correctly jQuery in the function scope
If I made the test in the firebug console after the application load can.$ is always equals $ in both case
Is there a change or a new decision that I'm not aware of, or would it be a bug ?
My test case is the following test_dollar.js (after running js jmvc\generate\app test_dollar)
If I run this simple script
- steal(
- 'can/control',
- function(){
- console.log("With function() ");
- if (can.$ !== $) {
- console.log("Jquery is not jquery");
- console.log("can.$",can.$);
- console.log("$",$);
- } else {
- console.log("Jquery is Jquery");
- }
- });
- steal(
- 'can/control',
- function($){
- // set your application up
- console.log("With function($) ");
- if (can.$ !== $) {
- console.log("Jquery is not jquery");
- console.log("can.$",can.$);
- console.log("$",$);
- } else {
- console.log("Jquery is Jquery");
- }
- })
I get the following console output in firebug