aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui
diff options
context:
space:
mode:
authorFrançois Frisch2012-03-19 09:21:15 -0700
committerFrançois Frisch2012-03-19 09:21:15 -0700
commit222562c734396403c18c90a1ca395a36c4d49da4 (patch)
tree4e634351bf57b69c685e6a388fd6a28495ac13bc /node_modules/montage/ui
parent54eb5672a5f43fb157aa7ecb88b0ba8a06296b86 (diff)
downloadninja-222562c734396403c18c90a1ca395a36c4d49da4.tar.gz
Youtube appending script in draw
Diffstat (limited to 'node_modules/montage/ui')
-rw-r--r--node_modules/montage/ui/youtube-channel.reel/youtube-channel.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js b/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js
index fd642290..3e20c406 100644
--- a/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js
+++ b/node_modules/montage/ui/youtube-channel.reel/youtube-channel.js
@@ -77,9 +77,22 @@ var YoutubeChannel = exports.YoutubeChannel = Montage.create(Component, {
77 // create url 77 // create url
78 var url = "http://gdata.youtube.com/feeds/api/users/" + this._channel + "/uploads?v=2&alt=json-in-script&callback=" + callbackName; 78 var url = "http://gdata.youtube.com/feeds/api/users/" + this._channel + "/uploads?v=2&alt=json-in-script&callback=" + callbackName;
79 79
80 var script = document.createElement("script"); 80 this.script = document.createElement("script");
81 script.src = url; 81 this.script.src = url;
82 this._element.appendChild(script); 82 this.needsDraw = true;
83 }
84 },
85
86 script: {
87 value: null
88 },
89
90 draw: {
91 value: function() {
92 if (this.script) {
93 this._element.appendChild(this.script);
94 this.script = null;
95 }
83 } 96 }
84 }, 97 },
85 98