Commit 3041a8f22c08df96ce5870e099349794df901d9f
- Diff rendering mode:
- inline
- side by side
mouchak/static/js/models.js
(5 / 3)
  | |||
76 | 76 | var callback = this.get('callback'); | |
77 | 77 | script.src = this.get('src'); | |
78 | 78 | document.body.appendChild(script); | |
79 | script.onload = function() { | ||
80 | eval(callback); | ||
81 | }; | ||
79 | if(callback) { | ||
80 | script.onload = function() { | ||
81 | eval(callback); | ||
82 | }; | ||
83 | } | ||
82 | 84 | } | |
83 | 85 | else if(this.get('src').match(/\.css/)) { | |
84 | 86 | var link = document.createElement('link'); |