What is 'this' in a telephone bundle? I am working on an application where I have local javascript packed with the application and remote javascript pulled from the server. I use coffeescript to generate all javascript.
Both files are included in the application index header generated via haml as such:
%script{:src=>"javascripts/file1.js"}
%script{:src=>"http://192.168.5.205:3000/assets/file2.js"}
file1.js.coffee:
@myObj1 = property: true
file2.js.coffee:
@myObj2 = property: true
myObj1available all over the world and may be referred to as simple myObj1, but myObj2accessible only through document.myObj2and cannot be called simply myObj2. What's happening?
source
share