Commit 74505395 authored by Romain Courteaud's avatar Romain Courteaud

Use 'this' in the ready function.

parent b3ca6f36
...@@ -414,13 +414,13 @@ ...@@ -414,13 +414,13 @@
}); });
} }
function clearGadgetInternalParameters(g) { function clearGadgetInternalParameters() {
g.__sub_gadget_dict = {}; this.__sub_gadget_dict = {};
createMonitor(g); createMonitor(this);
} }
function loadSubGadgetDOMDeclaration(g) { function loadSubGadgetDOMDeclaration() {
var element_list = g.element.querySelectorAll('[data-gadget-url]'), var element_list = this.element.querySelectorAll('[data-gadget-url]'),
element, element,
promise_list = [], promise_list = [],
scope, scope,
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
url = element.getAttribute("data-gadget-url"); url = element.getAttribute("data-gadget-url");
sandbox = element.getAttribute("data-gadget-sandbox"); sandbox = element.getAttribute("data-gadget-sandbox");
if (url !== null) { if (url !== null) {
promise_list.push(g.declareGadget(url, { promise_list.push(this.declareGadget(url, {
element: element, element: element,
scope: scope || undefined, scope: scope || undefined,
sandbox: sandbox || undefined sandbox: sandbox || undefined
...@@ -1616,8 +1616,8 @@ ...@@ -1616,8 +1616,8 @@
return fct.call(g, g); return fct.call(g, g);
}; };
} }
TmpConstructor.ready(function (g) { TmpConstructor.ready(function () {
return startService(g); return startService(this);
}); });
loading_gadget_promise.push(ready_wrapper); loading_gadget_promise.push(ready_wrapper);
......
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