Commit 76805e06 authored by Romain Courteaud's avatar Romain Courteaud

Declare the method 'declareGadget'.

parent e801e33b
......@@ -293,7 +293,8 @@
/////////////////////////////////////////////////////////////////
// RenderJSGadget.declareGadget
/////////////////////////////////////////////////////////////////
RenderJSGadget.prototype.declareGadget = function (url, options) {
RenderJSGadget
.declareMethod('declareGadget', function (url, options) {
var queue,
parent_gadget = this,
previous_loading_gadget_promise = loading_gadget_promise;
......@@ -362,8 +363,7 @@
});
loading_gadget_promise = queue;
return loading_gadget_promise;
};
RenderJSGadget
})
.declareMethod('getDeclaredGadget', function (gadget_scope) {
if (!this.sub_gadget_dict.hasOwnProperty(gadget_scope)) {
throw new Error("Gadget scope '" + gadget_scope + "' is not known.");
......
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