Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
renderjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
renderjs
Commits
201fdb09
Commit
201fdb09
authored
May 15, 2018
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clearing gadget internal parameters can be done synchronously.
parent
b9e4d9a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
renderjs.js
renderjs.js
+6
-5
No files found.
renderjs.js
View file @
201fdb09
...
@@ -492,9 +492,9 @@
...
@@ -492,9 +492,9 @@
}).
fail
(
letsCrash
);
}).
fail
(
letsCrash
);
}
}
function
clearGadgetInternalParameters
()
{
function
clearGadgetInternalParameters
(
gadget
)
{
this
.
__sub_gadget_dict
=
{};
gadget
.
__sub_gadget_dict
=
{};
createGadgetMonitor
(
this
);
createGadgetMonitor
(
gadget
);
}
}
function
loadSubGadgetDOMDeclaration
()
{
function
loadSubGadgetDOMDeclaration
()
{
...
@@ -539,8 +539,7 @@
...
@@ -539,8 +539,7 @@
return
RSVP
.
all
(
promise_list
);
return
RSVP
.
all
(
promise_list
);
}
}
RenderJSGadget
.
__ready_list
=
[
clearGadgetInternalParameters
,
RenderJSGadget
.
__ready_list
=
[
loadSubGadgetDOMDeclaration
];
loadSubGadgetDOMDeclaration
];
RenderJSGadget
.
ready
=
function
ready
(
callback
)
{
RenderJSGadget
.
ready
=
function
ready
(
callback
)
{
this
.
__ready_list
.
push
(
callback
);
this
.
__ready_list
.
push
(
callback
);
return
this
;
return
this
;
...
@@ -1075,6 +1074,7 @@
...
@@ -1075,6 +1074,7 @@
var
i
,
var
i
,
scope
,
scope
,
queue
=
new
RSVP
.
Queue
();
queue
=
new
RSVP
.
Queue
();
clearGadgetInternalParameters
(
gadget_instance
);
// Trigger calling of all ready callback
// Trigger calling of all ready callback
function
ready_wrapper
()
{
function
ready_wrapper
()
{
return
gadget_instance
;
return
gadget_instance
;
...
@@ -1812,6 +1812,7 @@
...
@@ -1812,6 +1812,7 @@
return
configureMutationObserver
(
TmpConstructor
,
url
,
root_gadget
);
return
configureMutationObserver
(
TmpConstructor
,
url
,
root_gadget
);
})
})
.
push
(
function
waitForReadyList
()
{
.
push
(
function
waitForReadyList
()
{
clearGadgetInternalParameters
(
root_gadget
);
// Trigger all ready functions
// Trigger all ready functions
return
triggerReadyList
(
TmpConstructor
,
root_gadget
);
return
triggerReadyList
(
TmpConstructor
,
root_gadget
);
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment