I was studying Javascript / Ember and I was looking into its source codes. http://ift.tt/2rkyCi3
While I was studying, I found something interesting and I wonder how it works. As you may know, you can get version number of Ember if you type Ember.VERSION in the browser console. I wanted to do in my project so I started searching codes how Ember did it.
I could find
// in packages/ember/lib/index.js
Ember.VERSION = VERSION;
...
// Later exports Ember object
However I can't find how Ember makes it available in window (from browser). I expected they did like... window['Ember'] = Ember or something like that but I couldn't find any similar codes.
I wonder if there is anyone knows how they make Ember object available throughout window. Thank you so much!
Aucun commentaire:
Enregistrer un commentaire