Commit 91c789e9 authored by Romain Courteaud's avatar Romain Courteaud

Release version 0.5.1

parent 812510cb
This diff is collapsed.
This diff is collapsed.
......@@ -766,6 +766,13 @@
if (options.element === undefined) {
options.element = document.createElement("div");
}
function loadDependency(method, url) {
return function () {
return method(url);
};
}
return new RSVP.Queue()
.push(function () {
return renderJS.declareGadgetKlass(url);
......@@ -790,17 +797,17 @@
})
// Load all JS/CSS
.push(function (all_list) {
var parameter_list = [],
var q = new RSVP.Queue(),
i;
// Load JS
for (i = 0; i < all_list[0].length; i += 1) {
parameter_list.push(renderJS.declareJS(all_list[0][i]));
q.push(loadDependency(renderJS.declareJS, all_list[0][i]));
}
// Load CSS
for (i = 0; i < all_list[1].length; i += 1) {
parameter_list.push(renderJS.declareCSS(all_list[1][i]));
q.push(loadDependency(renderJS.declareCSS, all_list[1][i]));
}
return RSVP.all(parameter_list);
return q;
})
.push(function () {
return gadget_instance;
......@@ -1354,9 +1361,9 @@
queue.push(ready_wrapper);
for (i = 0; i < tmp_constructor.ready_list.length; i += 1) {
// Put a timeout?
queue.push(tmp_constructor.ready_list[i]);
queue.push(tmp_constructor.ready_list[i])
// Always return the gadget instance after ready function
queue.push(ready_wrapper);
.push(ready_wrapper);
}
queue.push(resolve, function (e) {
reject(e);
......
This diff is collapsed.
{
"name": "renderjs",
"version": "0.5.0",
"version": "0.5.1",
"description": "RenderJs provides HTML5 gadgets",
"main": "dist/renderjs-latest.js",
"dependencies": {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment